cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Library issue (again?)

From: Max L. Eidswick <max_at_eidswick.com>
Date: Thu, 22 Nov 2007 13:45:17 -0700

Hi, Yang -- yes, I have just reconfirmed that all builds (libcurl and source project) are set with /MT and CURL_STATICLIB is defined
in the preprocessor directive(s).

I also added wldap32.lib so the libraries are now curllib.lib ws2_32.lib winmm.lib wldap32.lib

I have the following compile/link results:
 
----- snip
------ Rebuild All started: Project: RedPawComms, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'RedPawComms', configuration 'Debug|Win32'
Compiling...
RedPawComms.c
Compiling resources...
Compiling manifest to resources...
Linking...
   Creating library .\Debug/RedPawComms.lib and object .\Debug/RedPawComms.exp
RedPawComms.obj : error LNK2019: unresolved external symbol _sprintf referenced in function _RPV7InitializeLogFile
curllib.lib(mprintf.obj) : error LNK2001: unresolved external symbol _sprintf
RedPawComms.obj : error LNK2019: unresolved external symbol __RTC_CheckEsp referenced in function _RPV7InitializeLogFile
RedPawComms.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
RedPawComms.obj : error LNK2001: unresolved external symbol __RTC_InitBase
curllib.lib(ftp.obj) : error LNK2001: unresolved external symbol _strstr

// ---- a bunch of the same type of errors removed ----- //

curllib.lib(parsedate.obj) : error LNK2019: unresolved external symbol __mktime64 referenced in function _mktime
curllib.lib(parsedate.obj) : error LNK2019: unresolved external symbol _isalnum referenced in function _skip
curllib.lib(parsedate.obj) : error LNK2019: unresolved external symbol _isalpha referenced in function _Curl_parsedate
curllib.lib(strerror.obj) : error LNK2019: unresolved external symbol _strerror referenced in function _Curl_strerror
curllib.lib(strerror.obj) : error LNK2019: unresolved external symbol ___sys_nerr referenced in function _Curl_strerror
curllib.lib(formdata.obj) : error LNK2019: unresolved external symbol __chkstk referenced in function _AddFormDataf
.\Debug/RedPawComms.exe : fatal error LNK1120: 84 unresolved externals
Build log was saved at "file://c:\Documents and Settings\max\My Documents\RPS\RPSV7Dvlmt\RedPawComms\Debug\BuildLog.htm"
RedPawComms - 237 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

----- end of snip -----

It cannot resolve the c runtime lib calls, but the library is defined. If I remove CURL_STATICLIB the errors are eliminated except
for the curl call

Any thoughts?

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Yang Tse
Sent: Thursday, November 22, 2007 12:28 PM
To: libcurl development
Subject: Re: Library issue (again?)

> Is the /MT multi-threaded library the correct one?

Yes if all libraries in your project are static and you'r not building a dll.

> I have also defined the CURL_STATICLIB in the preprocessor directives for
> the test module based on a posting I read, but I am not sure if this is needed,
> correct, etc.

Read docs/INSTALL section Win32 (line 145 onwards) again, and when you
get near line 345 slow down and keep reading a few more lines ;-)

> Linking...
> curllib.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_unbind_s referenced in function _Curl_ldap
> curllib.lib(ldap.obj) : error LNK2019: unresolved external symbol __imp__ldap_msgfree referenced in function _Curl_ldap

Link also with wldap32.lib

-- 
-=[Yang]=-
Received on 2007-11-22