PDA

View Full Version : Can't find QtDesignerd4: Problem Compiling Qide



dave
27th July 2006, 16:03
Hi

Everytime I try to compile Qide (talked about in the QT Software Section of the forum), I get the following error message:

mingw32-make[2]: Entering directory `I:/code/QIde-0.15/lineedithistoplugin'
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -shared -Wl,--out-implib,debug\liblineedithistoplugin.a -o debug\lineedithistoplugin.dll" debug\lineedithisto.o debug\lineedithistoplugin.o debug\moc_lineedithisto.o debug\moc_lineedithistoplugin.o -L"c:\Qt\4.1.4\lib" -lQtGuid4 -lQ
tCored4 -lQtDesignerd4
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot find -lQtDesignerd4
collect2: ld returned 1 exit status
mingw32-make[2]: *** [debug\lineedithistoplugin.dll] Error 1

I'm using QT 4.1.4 OS Edition configured for Debug. Windows XP and minGW.

What it seemed to me is that the linker can't find lQtDesignerd4, which must be the debug version of lQtDesigner4. I have looked under the "c:\Qt\4.1.4\lib" directory but couldn't find any file named libQtDesignerd4.dll. Or maybe it is some other problem?

Thanks.

wysota
27th July 2006, 20:50
That's exactly the problem you described. If you compile in release mode instead of debug, it should link fine. Alternatively you might want to compile the designer library in debug mode.

dave
27th July 2006, 22:17
Thanks for replying wysota.

Maybe I didn't explain myself too well. Sorry. First I tried to compile Qide in release mode, but when it came to the lineedithistoplugin gcc output an error: "cannot find -lQtGuid4". So I thought it's because I have to compile this plugin in debug mode. I ran the "build debug libraries" option. All went well. but when I ran make again on the plugin I got the "cannot find -lQtDesignerd4" error.

Another Problem I started running into (after compiling Qt in debug mode): when I try to compile the code from the "programming gui with qt 4" book, I get many errors about multiply definitions of functions in moc generated files.

I should also add that while I'm proficient with c++, and has programmed c++ before, this is my first foray into the minGW-make and gcc business. all this stuff with make has gotten me confused. I'm rather relying on qmake to produce correct make files.

dave

jacek
27th July 2006, 22:43
Another Problem I started running into (after compiling Qt in debug mode): when I try to compile the code from the "programming gui with qt 4" book, I get many errors about multiply definitions of functions in moc generated files.
I guess you ran "qmake -project" too many times (you should do it at most once per project). Check whether your .pro doesn't contain too many entries in HEADERS and SOURCES variables.

dave
28th July 2006, 00:56
Wow. Thanks jacek. That was the problem. the header file was add twice. :confused: Didn't know running qmake -project more than once matters....

The is still the problem with qide. Anyone tried to compile the last version 0.15? Shouldn't the file QtDesignerd4 be compile by "build debug libraries" option in the Qt menu?

Any help appreciated.

wysota
28th July 2006, 02:08
Didn't know running qmake -project more than once matters....

If you want to avoid such problems in future, be sure to run (n)make clean before running qmake -project again. This will delete all the intermediate files including moc and uic generated ones (one of which probably caused you problems).

dave
30th July 2006, 11:45
Well, you were right wysota. Turn out even though I first compile the whole project in release. the pro file inside lineedithistoplugin still defined config += debug. Changed it to release and everything works.
Stll can't find qtdesignerd4.lib. But now my interest is only academic. Till the next time...

Thanks

jlbrd
1st August 2006, 22:15
Indeed, I left "debug" in the project file.