cURL / Mailing Lists / curl-users / Single Mail


how to link with static C runtime?

From: Dmitry Babitsky <>
Date: Sun, 05 Dec 2004 21:08:17 -0500


I'm trying to statically link in c-runtime lib(on windows: LIBCMT as opposed
i changed the switch in the makefile, libcurl.lib is compiled/linked
correctly, but curl.exe is not.

the problem is that the following files have been compiled specifying
MSVCRT, and the source code to them is not included in the distribution,
only .obj files. I have tried using /NODEFAULTLIB:MSVCRT, but that did not

Q: why do these files come in compiled form and not as source? And if so,
how can i achieve what i want and avoid link conflict?


P:\libs\curl-7.12.2\src>dir *obj
Volume in drive P is Dev
Volume Serial Number is 0000-0000

Directory of P:\libs\curl-7.12.2\src

11/28/2004 08:20 PM 922 getpassr.obj
11/28/2004 08:20 PM 1,842 homedirr.obj
11/28/2004 08:20 PM 139,907 hugehelpr.obj
11/28/2004 08:20 PM 107,677 mainr.obj
11/28/2004 08:20 PM 419 strtoofftr.obj
11/28/2004 08:20 PM 1,848 timevalr.obj
11/28/2004 08:20 PM 8,055 urlglobr.obj
11/28/2004 08:20 PM 6,105 writeoutr.obj
               8 File(s) 266,775 bytes
Received on 2004-12-06