Hi,
I had a similar problem when making qwt dll. So i made some debug and found the the ld parameters where with backslashes (-L parameter). I found that the winavr sh.exe shell was used by the toolchain and the link cmd line was (notice backslashes in :-LC:\Qt\Q...)
echo linking ../lib/qwtd.dll && g++ -shared -mthreads -Wl,--out-implib,C:/MinGW-Lib/qwt-6.1-rc3/src/../lib/libqwtd.a -o ../lib/qwtd.dll object_script.qwtd.Debug -LC:\Qt\Qt5.0.1\5.0.1\mingw47_32\lib -lQt5OpenGLd -lQt5Svgd -lQt5PrintSupportd -lQt5Widgetsd -lQt5Concurrentd -lQt5Guid -lQt5Cored -llibEGLd -llibGLESv2d -lgdi32 -luser32
this produce the following errors :
linking ../lib/qwtd.dll
c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5OpenGLd
c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5Svgd
c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5PrintSupportd
c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5Widgetsd
c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5Concurrentd
c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5Guid
c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5Cored
c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llibEGLd
c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llibGLESv2d
collect2.exe: error: ld returned 1 exit status
So, i tried manualy running the same command with C:\WinAVR\utils\bin\sh.exe but replacing the backslashes with slashes, and it worked...
The problem is, when qmake detects a sh.exe, it tries to use it in the toolchain, but this winavr sh.exe does not like backslashes. I didn't try the MSYS shell.
I found the following in qmake.conf (c:\Qt\Qt5.0.1\5.0.1\mingw47_32\mkspecs\win32-g++\qmake.conf):
!isEmpty(QMAKE_SH) {
MINGW_IN_SHELL = 1
QMAKE_DIR_SEP = /
include(../common/shell-unix.conf)
} else {
include(../common/shell-win32.conf)
}
and in spec_pre.prf (c:\Qt\Qt5.0.1\5.0.1\mingw47_32\mkspecs\features\s pec_pre.prf) :
equals(QMAKE_HOST.os, Windows) {
QMAKE_EXT_OBJ = .obj
QMAKE_EXT_RES = .res
QMAKE_SH =
PATH = $$(PATH)
PATH = $$split(PATH, ;)
for(dir, PATH) {
exists($$dir/sh.exe) {
QMAKE_SH = $$dir/sh.exe
break()
}
}
unset(PATH)
} else {
QMAKE_EXT_CPP += .C
QMAKE_EXT_H += .H
QMAKE_EXT_OBJ = .o
QMAKE_SH = sh
}
You comment these some lines to force qmake to use the windows shell, not the winavr shell, but it won't work, because mingw32-make also search for a shell, on my case it finds :
find_and_set_shell() path search set default_shell = C:/WinAVR/utils/bin/sh.exe (from trace file , mingw32-make -d --trace > file)
So, the easy solution is to temporarily remove winavr from path.... it works, i finaly managed to have qwt.dll and qwt.a compiled...
I think (I am new to Qt, trying to move from BC++ to Qt) that the problem is within the Qt environment, perhaps in the c:\Users\......\AppData\Roaming\QtProject\qtcreato r\toolchains.xml or profiles.xml, where the pathes are stored with backslashes for the mingw conf. I tried to edit these files, but QtCreator put backslashes again each time i run it....).
.
Bookmarks