I am on working on application on VS2008 MFC, where I am refering a third party lib file, which works fine on release build of my application.
the method signature which I called in my application in this way...
This method is their in the lib file. which works fine when I build in Release mode of my application. But when same code is called in debug mode I am getting error saying
"First-chance exception at 0x003a60e3 in My.exe: 0xC0000005: Access violation reading location 0x003a607e."
and My.exe exits.
can you share some info on this ...
If your app uses libraries, make sure that you link to the same C runtime library (CRT)(e.g. if it uses Multithreaded DLL you too need to link the same CRT with your app). Otherwise, you will get access violation errors.
Since the 3rd party DLL must be a release build DLL, it must have been linked to release version of CRT. While, in debug build, your app will link to debug version of CRT. Ask the supplier of the DLL to provide you with a debug version of their library also. In debug build, you can link it to the debug version of their DLL.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)