cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problems linking curl as a library with openSLL under windows

From: Mark Walter <MWalter_at_impulse.com>
Date: Thu, 13 Apr 2006 16:22:12 -0400

I have tried to search the archives for an answer to this, but haven't found anything current. Anyway here is my setup and here is my problem.

I am using windows xp, and I have Dev Studio 6 installed, the windows SDK (which is in a differant dir and has more updated headers), and Dev Studio 7.
I am using Libcurl version 7.15.3, and OpenSSL 0.9.8a.

I have compiled OpenSLL as a library. I am attempting to compile LibCurl as a library. I have had some issues with compiling that I managed to solve, some of which were because the include paths were pointing to a ../VC98/Include directory which had old headers and now point to ../Program Files/Microsoft SDK/Include.

I got it to compile and I am using the HTTP_ONLY define. However the linker has a lot of problems. I am using the "nmake vc-ssl" command. Here is some output from it:

 cd lib
 nmake /f Makefile.vc6 cfg=release-ssl
 cd ..\src
 nmake /f Makefile.vc6 cfg=release-ssl
 link.exe /incremental:no /libpath:"../lib" /nologo /out:curl.exe /subsystem:console /machine:I386 /LIBPATH:"../../openssl-0.9.7e/out32" libcurl.lib libeay32.lib ssleay32.lib gdi32.lib wsock32.lib winmm.lib hugehelpr.obj writeoutr.obj urlglobr.obj getpassr.obj homedirr.obj timevalr.obj strtoofftr.obj mainr.obj curlr.res
libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__GetUserObjectInformationW_at_20
libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__GetProcessWindowStation_at_0
libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__GetDesktopWindow_at_0
libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__MessageBoxA_at_16
libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__DeregisterEventSource_at_4
libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__ReportEventA_at_36
libeay32.lib(cryptlib.obj) : error LNK2001: unresolved external symbol __imp__RegisterEventSourceA_at_8
curl.exe : fatal error LNK1120: 7 unresolved externals

The first odd thing is the reference to openssl-0.9.7e. I can't figure out where this is comming from. I do not have openssl 0.9.7e installed. The next thing is the cryptlib.obj errors. Those symbols come from user32.lib, which is not listed in the linker library list. I have edited makefile.vc6 (I am not that familliar with makefiles), and tried to put the library in. It seems that the link command doesn't get these additonal libraries from the Makefile.vc6 file. I have messed around with it quite a bit and it seems to not get its linking info from it, or if it does, in a manner I do not understand.

Can anyone help me?

What I ultimatly want is a LibCurl I can use in my applications that will not require any additional DLLs (hence trying to make this as a library instead of a DLL).

-- Mark Walter
Received on 2006-04-13