cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem compiling on WIN32 (almost solved, I think)

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Mon, 24 May 2004 14:13:35 +0200

<Massimiliano_Ziccardi_at_intesa.it> said:

> I had to change the following files to make it almost compile (useing make
> vc-ssl-dll):
> src/Makefile.vc6:
> Line number 33:
> CFLAGS = /I "../lib" /I "../include" /I "$(ZLIB_PATH)"
> /nologo /W3 /GX /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c /D
> "USE_MANUAL"
> Line number 60:
> !IF "$(CFG)" == "release-ssl" || "$(CFG)"
> == "release-ssl-dll"
> lib/Makefile.vc6:
> Added:
> WINLIBS = WS2_32.LIB WINMM.LIB

Or you could add '-DWITHOUT_MM_LIB' to CFLAGS.

> Anyway, now, launching make vc-ssl-dll I get the following errors:
>
> link.exe /incremental:no /libpath:"../lib" /nologo /libpath:"D:
> \libs\CPP\zlib-1.2.1" /out:curl.exe /subsystem:console /machine:I386
> wsock32.lib libcurl.lib winmm.lib zlib.lib hugehelpr.obj writeoutr.obj
> urlglobr.obj getpassr.obj homedirr.obj mainr.obj curlr.res
> mainr.obj : error LNK2001: unresolved external symbol _curlx_tvnow
> mainr.obj : error LNK2001: unresolved external symbol _curlx_strtoll
> mainr.obj : error LNK2001: unresolved external symbol _curlx_tvdiff
> curl.exe : fatal error LNK1120: 3 unresolved externals

Add thses lines to lib\libcurl.def and relink the import library:
  curlx_tvdiff
  curlx_tvnow
  curlx_strtoll

The last function is tricky; it's needed only for targets that doesn't
have strtoll(). So adding it to libcurl.def for those who have it would
fail in the link. I suggest we remove NEED_CURL_STRTOLL and
add it always.

But you could avoid all these problems by linking to the static
libcurl.lib. I assume that's what most people do since this it's not
been spotted before.

--gv
Received on 2004-05-24