Linking Dlib to QT application
-
Hi
Did you compile the libdlib.a yourself ?also QTDlibXMLGenerator is the Qt app (?), so it fails with error 1 in the linking phase?
Also what version of Xcode ?
seems 8 should be used ?
https://www.learnopencv.com/install-dlib-on-macos/@mrjj said in Linking Dlib to QT application:
I am using QT IDE only not XCode.
I used CMake to compile the libdlib.a . -
@mrjj said in Linking Dlib to QT application:
I am using QT IDE only not XCode.
I used CMake to compile the libdlib.a . -
@mrjj I used the documentation to install QT, I didn't choose any compiler there. Did I do anything wrong?
-
@Arqam
I dont think so but its easy to test.
Make default GUI app (via menu) and see if it runs. -
@mrjj I am able to run the default app which shows the window, I am also able to run openCV code by linking my openCV library.
But Dlib its throwing errors in the build@Arqam
Then it sounds like all is ok compiler wise.
Ccan you please try this
https://stackoverflow.com/questions/43795385/linker-command-failed-with-exit-code-1-use-v-to-see-invocation-xcode-8-swifand if "reveal in log" tell more, post it here ?
-
@Arqam
Then it sounds like all is ok compiler wise.
Ccan you please try this
https://stackoverflow.com/questions/43795385/linker-command-failed-with-exit-code-1-use-v-to-see-invocation-xcode-8-swifand if "reveal in log" tell more, post it here ?
@mrjj I am getting this error :
ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [XMLGenerator.app/Contents/MacOS/XMLGenerator] Error 1 01:18:21: The process "/usr/bin/make" exited with code 2. Error while building/deploying project XMLGenerator (kit: Desktop Qt 5.9.1 clang 64bit2) When executing step "Make"
The full terminal output with warnings : https://pastebin.com/azpD6Byh
Anything that I did wrong?
-
Hi,
Might be a silly question but are you sure that all your dependencies are built for 64bit ?
-
@Arqam said in Linking Dlib to QT application:
ld: symbol(s) not found for architecture x86_64 clang: error: linker
If you get error on type:
ld: symbol(s) not found for architecture x86_64 clang: error: linker
By my experience ist tipical that one or more function wo you use from the lib ist not inside... or not avaiable...
Use consolenm --help libname.a /// or waht else
after you have all result from class & function inside the lib
typical resul: https://raw.githubusercontent.com/pehohlva/QCLD2/master/google_bridge/function.nm.txtMac architecture is very powerfull and give you all waht you need..
example .. today i discovery how to convert translate.tr file from qt to po . and back . and after translate online in many language... funny qt&& qmake file on mac is better give the full path..
LIBS += -L/usr/local/opt/curl/lib -lcurl
is not like cmake that you say:find_package(Boost COMPONENTS system thread REQUIRED) find_package(CURL REQUIRED)
and all is run...
-
@Arqam said in Linking Dlib to QT application:
ld: symbol(s) not found for architecture x86_64 clang: error: linker
If you get error on type:
ld: symbol(s) not found for architecture x86_64 clang: error: linker
By my experience ist tipical that one or more function wo you use from the lib ist not inside... or not avaiable...
Use consolenm --help libname.a /// or waht else
after you have all result from class & function inside the lib
typical resul: https://raw.githubusercontent.com/pehohlva/QCLD2/master/google_bridge/function.nm.txtMac architecture is very powerfull and give you all waht you need..
example .. today i discovery how to convert translate.tr file from qt to po . and back . and after translate online in many language... funny qt&& qmake file on mac is better give the full path..
LIBS += -L/usr/local/opt/curl/lib -lcurl
is not like cmake that you say:find_package(Boost COMPONENTS system thread REQUIRED) find_package(CURL REQUIRED)
and all is run...
-
Hi,
Might be a silly question but are you sure that all your dependencies are built for 64bit ?
-
@Arqam
Then it sounds like all is ok compiler wise.
Ccan you please try this
https://stackoverflow.com/questions/43795385/linker-command-failed-with-exit-code-1-use-v-to-see-invocation-xcode-8-swifand if "reveal in log" tell more, post it here ?
-
@Arqam said in Linking Dlib to QT application:
QT is compiled using qMake and dlib is compiled using CMake
this doesn't matter, what matters is the compiler used to build them.