PDA

View Full Version : Open SSL Linking



CHeader
23rd March 2008, 11:29
Hello everybody.

I've do have some issue's compiling my application under mingw32-make.exe, The follow errors appears:


g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o ..\..\test.exe object_script.test.Release -L"c:\Qt\4.3.4\lib" -lmingw32 -lqtmain release\test_res.o -LC:\OpenSSL\lib\MinGW -Llibeay32.a -Lssleay32.a -L../libtest/release -L../libcrypt/release -L../libidn/release -ltest -lcrypt -lidn -lgdi32 -lQtXml4 -lQtGui4 -lQtNetwork4 -lQtCore4
./release\sslsocket.o(.text+0x4db):sslsocket.cpp: undefined reference to `SSL_free'
./release\sslsocket.o(.text+0x64b):sslsocket.cpp: undefined reference to `SSL_free'
./release\sslsocket.o(.text+0x7cb):sslsocket.cpp: undefined reference to `SSL_free'
./release\sslsocket.o(.text+0x8ce):sslsocket.cpp: undefined reference to `SSL_new'
./release\sslsocket.o(.text+0x8d9):sslsocket.cpp: undefined reference to `BIO_s_mem'
./release\sslsocket.o(.text+0x8e1):sslsocket.cpp: undefined reference to `BIO_new'
./release\sslsocket.o(.text+0x8ec):sslsocket.cpp: undefined reference to `BIO_s_mem'
./release\sslsocket.o(.text+0x8f4):sslsocket.cpp: undefined reference to `BIO_new'
./release\sslsocket.o(.text+0x919):sslsocket.cpp: undefined reference to `SSL_set_bio'
./release\sslsocket.o(.text+0x9d4):sslsocket.cpp: undefined reference to `SSL_pending'
./release\sslsocket.o(.text+0x9f6):sslsocket.cpp: undefined reference to `SSL_read'
./release\sslsocket.o(.text+0xa63):sslsocket.cpp: undefined reference to `SSL_get_error'
./release\sslsocket.o(.text+0xaab):sslsocket.cpp: undefined reference to `BIO_read'
./release\sslsocket.o(.text+0xae8):sslsocket.cpp: undefined reference to `BIO_ctrl'
./release\sslsocket.o(.text+0xb0f):sslsocket.cpp: undefined reference to `SSL_connect'
./release\sslsocket.o(.text+0xbe8):sslsocket.cpp: undefined reference to `SSL_read'
./release\sslsocket.o(.text+0xc09):sslsocket.cpp: undefined reference to `SSL_write'
./release\sslsocket.o(.text+0xc26):sslsocket.cpp: undefined reference to `SSL_shutdown'
./release\sslsocket.o(.text+0xdf2):sslsocket.cpp: undefined reference to `BIO_write'
./release\sslsocket.o(.text+0xf05):sslsocket.cpp: undefined reference to `SSL_library_init'
./release\sslsocket.o(.text+0xf0a):sslsocket.cpp: undefined reference to `SSL_load_error_strings'
./release\sslsocket.o(.text+0xf0f):sslsocket.cpp: undefined reference to `TLSv1_client_method'
./release\sslsocket.o(.text+0xf17):sslsocket.cpp: undefined reference to `SSL_CTX_new'
./release\sslsocket.o(.text+0xf39):sslsocket.cpp: undefined reference to `SSL_CTX_free'
collect2: ld returned 1 exit status
mingw32-make[3]: *** [..\..\test.exe] Error 1
mingw32-make[3]: Leaving directory `C:/Documents and Settings/Rick/Bureaublad/test/src/test'
mingw32-make[2]: *** [release] Error 2
mingw32-make[2]: Leaving directory `C:/Documents and Settings/Rick/Bureaublad/test/src/test'
mingw32-make[1]: *** [sub-test-make_default] Error 2
mingw32-make[1]: Leaving directory `C:/Documents and Settings/Rick/Bureaublad/test/src'
mingw32-make: *** [sub-src-make_default] Error 2

The file where the mingw32-make includes appears:

win32 {
SOURCES += test/ssl_win.cpp
INCLUDEPATH += "C:\OpenSSL\include"
LIBS += -L"C:\OpenSSL\lib\MinGW"
LIBS += -Llibeay32.a -Lssleay32.a
}

I've uploaded both source files for research, Can anybody help me solving this errors?

jacek
23rd March 2008, 15:14
Change:
LIBS += -Llibeay32.a -Lssleay32.ato
LIBS += libeay32.a ssleay32.aor
LIBS += -leay32

CHeader
23rd March 2008, 20:41
Thank you but I have deleted it as I use a ssl connection on the server host. Anyways the follow errors come's up when done compiling on QTGUI4.dll


<?xml version="1.0" encoding="UTF-16"?>
<DATABASE>
<EXE NAME="hyves.exe" FILTER="GRABMI_FILTER_PRIVACY">
<MATCHING_FILE NAME="test.exe" SIZE="1080320" CHECKSUM="0x812EEBEA" MODULE_TYPE="WIN32" PE_CHECKSUM="0x109E2A" LINKER_VERSION="0x10000" LINK_DATE="03/23/2008 20:02:41" UPTO_LINK_DATE="03/23/2008 20:02:41" />
<MATCHING_FILE NAME="idleui.dll" SIZE="24576" CHECKSUM="0x1B38554D" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="12/05/2003 21:55:16" UPTO_LINK_DATE="12/05/2003 21:55:16" />
</EXE>
<EXE NAME="QtGui4.dll" FILTER="GRABMI_FILTER_THISFILEONLY">
<MATCHING_FILE NAME="QtGui4.dll" SIZE="10217472" CHECKSUM="0x40587411" BIN_FILE_VERSION="4.4.0.0" BIN_PRODUCT_VERSION="4.4.0.0" FILE_DESCRIPTION="C++ application development framework." COMPANY_NAME="Trolltech ASA" PRODUCT_NAME="Qt4" FILE_VERSION="4.4.0.0" ORIGINAL_FILENAME="QtGui4.dll" LEGAL_COPYRIGHT="Copyright (C) 2003-2008 Trolltech ASA" VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x9CB227" LINKER_VERSION="0x10000" UPTO_BIN_FILE_VERSION="4.4.0.0" UPTO_BIN_PRODUCT_VERSION="4.4.0.0" LINK_DATE="02/22/2008 15:20:55" UPTO_LINK_DATE="02/22/2008 15:20:55" />
</EXE>
<EXE NAME="kernel32.dll" FILTER="GRABMI_FILTER_THISFILEONLY">
<MATCHING_FILE NAME="kernel32.dll" SIZE="1027072" CHECKSUM="0x34766E6F" BIN_FILE_VERSION="5.1.2600.3119" BIN_PRODUCT_VERSION="5.1.2600.3119" PRODUCT_VERSION="5.1.2600.3119" FILE_DESCRIPTION="DLL-bestand voor Windows NT BASE API-client" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Besturingssysteem Microsoft® Windows®" FILE_VERSION="5.1.2600.3119 (xpsp_sp2_qfe.070416-1259)" ORIGINAL_FILENAME="kernel32" INTERNAL_NAME="kernel32" LEGAL_COPYRIGHT="© Microsoft Corporation. Alle rechten voorbehouden." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0xFFB56" LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="5.1.2600.3119" UPTO_BIN_PRODUCT_VERSION="5.1.2600.3119" LINK_DATE="04/16/2007 16:11:48" UPTO_LINK_DATE="04/16/2007 16:11:48" VER_LANGUAGE="Nederlands (Nederland) [0x413]" />
</EXE>
</DATABASE>


When I open my application it crashes?! Is this has to do with the QtGui4.dll file or my code? (Compiled EXE is 1.03 MB)

jacek
25th March 2008, 18:26
This is really weird. When exactly this message appears?