Hi I'm using /MT (LIBCMT.lib?) and it is multi-threaded since all my multi-thread code is working. LIBCMTD.lib is ignored because it is indicated in a post at MySQL forums " http://forums.mysql.com/read.php?45,49606,49606#msg-49606" and anyway applications do not compile if not ignored because lots of duplicated symbols at link time.
The issue is like this (as accurate as I remember) according the debugger call stack: 1) Call mysql_real_connect() 2) mysql_real_connect() calls a shared memory request function 3) the shared memory request fails in a internal strcpy() (asm, not source available) because a memory violation trying to acces 0x00000000 Note these conditions: - The program fails inside VC++ 2008 express debug session - The program runs perfect without debug session or called directly by user - I'm programming inside VirtualBox/WinXP Now I don't know if this problem is related to the VC++ debugger that fails with certain condition of the MySQL client library or the VirtualBox manages shared memory in a different way than a real computer. I emphasize that my program works perfect with Linux, FreeBSD and Solaris, even Windows if not run in a debug session, and the problem arises inside the MySQL library, not in the MySQL code but inside the shared memory function it calls. I hope this could help to get an idea Regards, Miguel