qt - no such file or directory -


i finishing migrating project qt 4.x 5, .pro file giving me lot of errors:

c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lhdp c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -l../../qwt/qwt-5.2.0/lib/debug/qwt5 c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lqenc c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lzlibwapi c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lqextserialport c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lqxmpp c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -ljson_lib c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lserialport1 

when comment lines containing -lwhatever same errors other lines below those, @

moc_dir += ./generatedfiles/release objects_dir += release ui_dir += ./generatedfiles rcc_dir = generatedfiles include(swibz.pri) 

here full code:

template = app target = swibz destdir = ../release qt += core gui network webkit webkitwidgets xml opengl serialport config += release defines += _windows qt_largefile_support qt_xml_lib qt_opengl_lib qt_network_lib qt_dll qwt_dll includepath += ../../../sprintlib \     ./generatedfiles \     ./generatedfiles/release \     generatedfiles/release \     . \     ./../../qwt/qwt-5.2.0/src \     ../../../qenc/qenc \     ../../../zlib-1.2.5 \     ../../../serial/qextserialport-1.2win-alpha \     ../../../qxmpp-0.3.0/src \     ../../../json \     ../../../qtserialport/qtserialport/include libs += -l"../../../sprintlib/release" \     -l"../../../qenc/release" \     -l"../../../zlib-1.2.5/contrib/vstudio/vc9/x86/zlibdllrelease" \     -l"../../../serial/qextserialport-1.2win-alpha/release" \     -l" qxmpp-0.3.0/lib" \     -l"../../../json/release" \     -l"../../../qtserialport/qtserialport/src/serialport/release" \     -lopengl32 \     -lglu32 \     -lgdi32 \     -luser32 \     -lhdp \ #cannot find     -l../../qwt/qwt-5.2.0/lib/debug/qwt5 \ #cannot find     -lqenc \ #cannot find     -lzlibwapi \ #cannot find     -lqextserialport \ #cannot find     -lsetupapi \     -lqxmpp \ #cannot find     -ljson_lib \ #cannot find     -lserialport1 #cannot find dependpath += ./  moc_dir += ./generatedfiles/release #cannot find objects_dir += release #cannot find ui_dir += ./generatedfiles #cannot find rcc_dir = ./generatedfiles #cannot find include(swibz.pri) #cannot find #win32:rc_file = ./swibz.rc translations = ln_en.ts translations = ln_lv.ts translations = ln_lt.ts translations = ln_es.ts  codecfortr     = utf-8 

what be? have folder generatedfiles , release, dont know whats wrong. also, dont quite understand meaning of ./../../ , ./, if explain me, maybe can see easier issue.

edit: here go more errors when coment -lthingys, doesnt make sense

g++: error: dependpath: no such file or directory g++: error: moc_dir: no such file or directory g++: error: +=: no such file or directory 

explanations

the usage of switches not coherent manual of gcc suite. (doc)

the linker searches standard list of directories library, file named liblibrary.a. linker uses file if had been specified precisely name.

the directories searched include several standard system directories plus specify -l.

there should names/filemanes appearing after -l switches.

please note if specify name , not filename (with extension), linker lib<name>.(a|so|dll) file.

example qxmpp:

you specified -l" qxmpp-0.3.0/lib" adds qxmpp-0.3.0/lib directory (located in current project directory) list of directory parse when looking libraries. -lqxmpp instructs linker within directory list file named libqxmpp.a.

solving

therefore, must check each not found library : there -l directive pointing right directory library stands (usualy ./ refer root of project, , ../ parent directory etc), , check call library correct name in -l directive (either full filemane, or abbreviated name).


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -