PDA

View Full Version : Additional libs for linker



megabyte-ceercop
25th March 2009, 07:31
Hello. I create Console application in QTCreator 1.0

In main.cpp file i insert code for manual create emputy windows form (winApi).

Compile is ok.
Linker send error:
undefined reference to `GetStockObject@4'

i need add "libgdi32.a" file as additional library for linker.
what me to do it?

thanks.

spirit
25th March 2009, 13:42
try to add this line in your pro-file


LIBS += libgdi32.a

megabyte-ceercop
26th March 2009, 06:00
Thanks. Its work.

LIBS option no present in QT-help.

spirit
26th March 2009, 06:16
it presents, you look for it not so carefully :)
take a look at this (http://doc.trolltech.com/4.5/qmake-variable-reference.html#libs)