Uploaded image for project: 'Axis-C++'
  1. Axis-C++
  2. AXISCPP-993

#undef _DEBUG in AxisConfiguration.hpp can lead to problems

    XMLWordPrintableJSON

Details

    Description

      In configuration/AxisConfiguration.hpp we have

      #undef _DEBUG

      What is the reason for this?

      This does not compile with VS 2005 with the following error:

      [cc] FileFunctions.cpp
      [cc] C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\use_ansi.h(49) : fatal error C1189: #error : You have included some C++/C library header files with _DEBUG defined and some with _DEBUG not defined. This will not work correctly. Please have _DEBUG set or clear consistently.

      I think one reason it is dangerous to use _DEBUG in some headers and not others is that it will bring in different versions of operator new and delete. This will then lead to crashes, if we are lucky (and memory corruption and wrong results if we aren't).

      Attachments

        Activity

          People

            Unassigned Unassigned
            hnordberg Henrik Nordberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: