cURL / Mailing Lists / curl-library / Single Mail

curl-library

compiling against libcurl_a_debug, in a c++ exec VC2013

From: Koren Shoval <koren99_at_gmail.com>
Date: Tue, 30 Sep 2014 21:04:48 +0300

Hi,

i'm not sure if it's a libcurl issue, or my own lack of c++ expertise, but
i thought i'd ask anyway....

I'm having some issues using libcurl when built with the winbuild makefiles

this is what i'm running

...\curl-7.38.0\winbuild>nmake /f Makefile.vc mode=static VC=12
WITH_DEVEL=..\external\x86\ WITH_SSL=static WITH_ZLIB=static
WITH_SSH2=static ENABLE_SSPI=yes ENABLE_IPV6=no ENABLE_IDN=yes MACHINE=x86
DEBUG=yes

in ..\external\x86\

i've put all the dependencies

libeay32.lib
libssh2.lib
libssh2_a.lib
libssh2_a_debug.lib
libssh2_debug.lib
olber32_a.lib
olber32_a_debug.lib
oldap32_a.lib
oldap32_a_debug.lib
ssleay32.lib
zlib.pdb
zlib_a.lib

(downloaded based on the link in the BUILD.WINDOWS.txt instructions)

though it only uses zlib and ssh2 and i can see the link command is using
the ssh2_a.lib and not the ssh2_a_debug.lib, also there's no zlib_a_debug
available

the warning message during linking curl,

LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other
libs; use /NODEFAULTLIB:library

when i add the libcurl_a_debug.lib i've got and compiling my exec with /MTd
i get:

LNK2005: already defined in libcmtd.lib

and when i ignore /NODEFAULTLIB:libcmtd.lib

i get the error unresolved errors, (i guess it's needed)
for example:
error LNK2001: unresolved external symbol __CrtDbgReportW

i'm not a c++ expert, but it seems to me that the compiled lib is using the
wrong dependencies
(release instead of debug, for some of the libs) which might cause these
issues...

BTW,

release mode, works without warnings and i'm able to compile my code when
ignoring libcmt.lib

any ideas what i can do?

Thanks,
Ren

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-09-30