cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: building with MSVC

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Wed, 25 Feb 2004 11:59:44 +0100

<codemstr_at_ptdprolog.net> said:

> User replies:
> Ok, I managed to get a stacktrace from MSVC:
> Execution ended on line 89 of file strtok.c (address 0x12345678):
> static char *buf = string;
> 0. 0x12345678 strtok(string={address out of bounds},token=':') Line:
> strtok.c:89
> 1. 0x12348342 do_something(url="http://www.blah.com") Line: file2.c:45
> 2. 0x12348493 main(argc=1,argv[] = {"http://www.blah.com"}) Line: file1.c:23

Dropping debug-builds just means dropping option '/MDd' which
makes the linker use MSCVRTD.LIB (and not MSVCRT.LIB).

If you want to have stacktrace in a crashing executable, use cl-option
'/Yd'. That puts debug info into the .obj/.exe indepentant of '/MD'
or '/MDd'. Depending on the JIT (Dr Watson or MSDev), you'll get
nearly the same stacktraces.

--gv
Received on 2004-02-25