PDA

View Full Version : Error in compiling OpenSSL & Qt statically



KGCode
12th October 2009, 05:46
I build OpenSSL static library successfully using "nmake -f ms\nt.mak".
Copy \include\openssl, libeay32.lib & ssleay32.lib to Qt folder.
When compile Qt, always get same error:


libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp__DeleteDC@4 referenced in function _readscreen
libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp__DeleteObject@4 referenced in function _readscreen
...


My system envirement is VC 2008, Openssl_SRC_v0.9.8k & Qt_SRC_v4.5.3. Here is my configuration parameters for Qt:

configure.exe -static -release -qt-gif -qt-libjpeg -no-sql-sqlite -openssl-linked -webkit -qt-zlib -no-dbus -no-phonon -no-qt3support -no-accessibility -no-opengl -qt-style-windowsce

Any suggestion?

squidge
12th October 2009, 09:01
DeleteDC sounds like you need to add Gdi32.lib to your list of libraries. I'm not sure about DeleteObject, so add that lib and see if its happy.

KGCode
14th October 2009, 15:12
Thanks fatjuicymole!

Gdi32.lib helps. But got another error:


main.obj : error LNK2019: unresolved external symbol "class QObject * __cdecl qt_plugin_instance_qjpeg(void)" (?qt_plugin_instance_qjpeg@@YAPAVQObject@@XZ) referenced in function "public: __thiscall StaticqjpegPluginInstance::StaticqjpegPluginInstan ce(void)" (??0StaticqjpegPluginInstance@@QAE@XZ)

Any clue?