cURL / Mailing Lists / curl-library / Single Mail

curl-library

Linking problem with libcurl and Visual Studio 2005

From: Ashley McConnell <ashley_at_siroccoracing.com>
Date: Tue, 26 Aug 2008 15:20:12 +0100

Hi Folks,

I have a confusing problem.

I downloaded the latest (at least it was last week) source code
distribution, I have successfully compiled it with both the release and
debug modes (using /MD and MDd respectively).

I have successfully linked and am using the curl lib successfully in release
mode, but when I try to link in debug mode I get linker errors that seem to
suggest that the library was compiled using /MTd code generation. I have
double checked (and rebuilt), but I still can't get it to work.

Here is a sample of the output: -

2>libcmtd.lib(dbgheap.obj) : error LNK2005: _malloc already defined in
MSVCRTD.lib(MSVCR80D.dll)
2>libcmtd.lib(dbgheap.obj) : error LNK2005: _calloc already defined in
MSVCRTD.lib(MSVCR80D.dll)
2>libcmtd.lib(dbgheap.obj) : error LNK2005: _realloc already defined in
MSVCRTD.lib(MSVCR80D.dll)
2>libcmtd.lib(dbgheap.obj) : error LNK2005: _free already defined in
MSVCRTD.lib(MSVCR80D.dll)
2>libcmtd.lib(dbgheap.obj) : error LNK2005: __aligned_malloc already defined
in MSVCRTD.lib(MSVCR80D.dll)
...

Any ideas of what I have done wrong?

Thanks for your help
All the best,
Ash
Received on 2008-08-26