Hello

I have a simple application that uses MySQL C API that works fine in
release mode, but when run in debug mode it crashes:

Unhandled exception at 0x51716970 in MSQ.exe: 0xC0000005: Access
violation reading location 0x00000000.

and don't know what can be the problem.

The application was built using VC++ 2010 Express and MySQL community
server 5.5, it consists of 2 parts

1. A DLL library with common functions to all my applications, it
contains the MySQL code (using the C API)

2. The application that connects to MySQL using my library that
invokes the MySQL C API

The library works fine under Linux and Windows but only in release
mode, if I use debug mode it simply crashes... never has worked in
debug mode, today with VC++ 2010 nor before when used VC++ 2008...

Fortunately the library works fine and has been exhaustively debugged,
so it runs perfectly under Linux and Wiindows... The problem is when I
try to debug an application that uses the library AND CALLS MYSQL
FUNCTIONS, it always crashes when executing any MySQL function by
access violation.

My applications always run in both Linux and Windows (that's why I use
my library that has been developed to compile in both systems, and Qt
for graphic apps) and are debugged under Linux since they're unable to
run in debug mode under Windows...

My configuration:

MY LIBRARY DLL
---------------------------
(RELEASE)
- Configuration: dynamic library (dll)
- Code generation: /MD (multithread dll)
- Input libs: libmysql.lib
- Ignore libs: LIBCMT.lib (otherwise fails link)
- Debug: No
(DEBUG)
- Configuration: dynamic library (dll)
- Code generation: /MDd (multithread dll debug)
- Input libs: libmysql.lib (also tested with mysqlclient.lib)
- Ignore libs: LIBCMT.lib (otherwise fails link)
- Debug: Yes

MY APPLICATION in debug mode
---------------------------
- Configuration: dynamic library (dll)
- Code generation: /MTd (multithread debug) --- (/MT for release)
- Input libs: libmysql.lib
- Ignore libs: -----
- Debug: Yes

I have tried lots of configurations but simply does not run in debug
mode... I must say that all my library functions work in both
release.debug mode, just the mysql functions crash in debug mode...

What can I do or where can I find the right configuration to use it in
debug mode?


Thanks a lot!

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql

Reply via email to