C++ 2003 vs C++ 2005

  • Thread starter Thread starter calin.hanchevici
  • Start date Start date
C

calin.hanchevici

Hi all,

I'm trying to use unmanaged C++ code with Visual Studio 2005. My
libraries were built using VC++ 2003.

When I'm calling my functions I get an AccesViolationException:
Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.

If I complile all libraries using VC++ 2005 it works fine.

Did anyone encountered this problem before? How did you solve it?

Thank you
Calin
 
Hi all,

I'm trying to use unmanaged C++ code with Visual Studio 2005. My
libraries were built using VC++ 2003.

When I'm calling my functions I get an AccesViolationException:
Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.

If I complile all libraries using VC++ 2005 it works fine.

Did anyone encountered this problem before? How did you solve it?

It's usually best to not mix C++ libraries built with different versions of
the compiler. That said, in many cases it's possible to make it work (even
going as far back as VC++ 1.0, 32 bit edition).

The first thing I would check is to look through all of the project settings
to make sure that the code that's calling the library and the implementation
of the library itself are compiled with the same (or as close to the same)
settings as possible.

If you can narrow down what's causing the Access Violation, someone might be
able to give you more specific help - or tell you why it just won't work.

-cd
 
Thank you CD,
my dlls were build using vcproj files generated by Visual Studion 2003.

calin
 
Back
Top