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

Discussion in 'C Programming' started by Christian Graf, Aug 11, 2003.

  1. 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
     
    Christian Graf, Aug 11, 2003
    #1
    1. Advertising

  2. Christian Graf

    Jirka Klaue Guest

    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
     
    Jirka Klaue, Aug 11, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anushi
    Replies:
    5
    Views:
    8,771
  2. Dave
    Replies:
    0
    Views:
    643
  3. RonL
    Replies:
    0
    Views:
    744
  4. ringos75
    Replies:
    0
    Views:
    963
    ringos75
    Apr 14, 2005
  5. H. Simpson
    Replies:
    4
    Views:
    281
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page