cURL / Mailing Lists / curl-library / Single Mail


Re: building with MSVC

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

<> 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="") Line: file2.c:45
> 2. 0x12348493 main(argc=1,argv[] = {""}) 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.

Received on 2004-02-25