Qt-interest Archive, March 2008
Linking error using Qt 4.3.4 and MinGW
Message 1 in thread
I have done a program [0] with Qt using Kdevelop under Debian. It compiles
perfectly there.
Now I have to compile it under Windows. I downloaded Qt 4.3.4 and MinGW (the
one that is automatically downloaded by the installer, from TT's ftp server).
The first problem that I find is that the directories setted in src/src.pro
are not respected. I mean, a bin directory is created under /src/. I'll write
all this in another mail in a few minutes. To get the source to compile, I
have to modify the .h created by uic because some paths are wrong (instead on
#include "glwidget.h" I have to write "../glwidget.h").
Once I fix that path problem, I start to compile and I get:
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o bin\practico6.exe
object_scrip
t.practico6.Release -L"c:
\Qt\4.3.4\lib" -lopengl32 -lglu32 -lgdi32 -luser32 -lm
ingw32 -lqtmain -lQtOpenGL4 -lQtGui4 -lQtCore4
./release\connectivitymatrix.o(.text+0x11b6):connectivitymatrix.cpp: undefined
r
eference to `_imp___Zls6QDebugRK7Point4F'
collect2: ld returned 1 exit status
mingw32-make[2]: *** [bin\practico6.exe] Error 1
mingw32-make[2]: Leaving directory `C:/psg/practico6/src'
mingw32-make[1]: *** [release] Error 2
mingw32-make[1]: Leaving directory `C:/psg/practico6/src'
mingw32-make: *** [sub-src-make_default] Error 2
Does any of you any idea what I may be doing wrong?
Regards, Lisandro.
[0] http://perezmeyer.com.ar/files/psg/practico6.tar.gz [34.4Kb]
--
[ signature omitted ]
Message 2 in thread
El Domingo 02 Marzo 2008, Lisandro DamiÃn Nicanor PÃrez Meyer escribiÃ:
> I have done a program [0] with Qt using Kdevelop under Debian. It compiles
> perfectly there.
>
> Now I have to compile it under Windows. I downloaded Qt 4.3.4 and MinGW
> (the one that is automatically downloaded by the installer, from TT's ftp
> server).
>
> The first problem that I find is that the directories setted in src/src.pro
> are not respected. I mean, a bin directory is created under /src/. I'll
> write all this in another mail in a few minutes. To get the source to
> compile, I have to modify the .h created by uic because some paths are
> wrong (instead on #include "glwidget.h" I have to write "../glwidget.h").
>
> Once I fix that path problem, I start to compile and I get:
>
> g++ -enable-stdcall-fixup -Wl,-enable-auto-import
> -Wl,-enable-runtime-pseudo-rel oc -Wl,-s -mthreads -Wl
> -Wl,-subsystem,windows -o bin\practico6.exe object_scrip
> t.practico6.Release -L"c:
> \Qt\4.3.4\lib" -lopengl32 -lglu32 -lgdi32 -luser32 -lm
> ingw32 -lqtmain -lQtOpenGL4 -lQtGui4 -lQtCore4
> ./release\connectivitymatrix.o(.text+0x11b6):connectivitymatrix.cpp:
> undefined r
> eference to `_imp___Zls6QDebugRK7Point4F'
> collect2: ld returned 1 exit status
> mingw32-make[2]: *** [bin\practico6.exe] Error 1
> mingw32-make[2]: Leaving directory `C:/psg/practico6/src'
> mingw32-make[1]: *** [release] Error 2
> mingw32-make[1]: Leaving directory `C:/psg/practico6/src'
> mingw32-make: *** [sub-src-make_default] Error 2
>
>
> Does any of you any idea what I may be doing wrong?
Solved. I am using qDebug() in a release environment.
Regards, Lisandro.
--
[ signature omitted ]