C and C++ colloding! // How to debug a DLL?

C

Christian Graf

Hi,

I have a bigger VC++6.0 project which is successfully compiled into a
DLL. It's compiled with full conformance with the ANSI C standard
(symbol __STDC__). I had to combine this code with my one (C++) which
worked fine for itself. After integrating my code one into one of the
classes the the compiler threw errors. They disappeared after the
compiler option __STDC__ was removed. My code is C++ code (and can't
be rewritten), thus the errors when compiled with __STDC__ activated.
An additional __ANSI_CPP__ is defined in the DLL project as well, but
doesn't seem to harm or benefit to the build process of the combined
project. Is the definition of __ANSI_CPP__ and __STDC__ not somewhat
odd, indeed contradictonary?

The problem now is, that my DLL does compile without errors but
doesn't work when used by an EXE. It simply crashes. As a DLL has no
console output, how can I get some indication what goes wrong? How can
I debug a DLL with VC++? And most importantly: How can I integrate
ANSI C and
VC++ in one project? Is there such a thing as guidelines, general
rules or special compiler settings?

Cheers
Chris
 
J

Jirka Klaue

Christian Graf wrote:
[...]
How can I integrate ANSI C and VC++ in one project?
> Is there such a thing as guidelines, general rules or special compiler settings?

While C does not support C++, C++ does support C. (hint: extern "C")
You should ask in comp.lang.c++ or in some Visual C++ group.

Jirka
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top