Header File Issues

Header File Issues

john4TMYX
Enthusiast Enthusiast
480 Views
1 Reply
Message 1 of 2

Header File Issues

john4TMYX
Enthusiast
Enthusiast

Hi guys,

 

My language is is C++ for the plugin development. For the debug build, I found the following lines in the stdafx.h give me a lot of problems.  When I keep as it is, then I can't build a debug version of plugin which links with other libs which are also compiled in debug mode. How your guys have solved this problem?

 

//- 'DEBUG workaround' below prevents the MFC or ATL #include-s from pulling
//- in "Afx.h" that would force the debug CRT through #pragma-s.
#if defined(_DEBUG) && !defined(AC_FULL_DEBUG)
#define _DEBUG_WAS_DEFINED
#undef _DEBUG
#pragma message (" Compiling MFC / STL / ATL header files in release mode.")
#endif

0 Likes
Accepted solutions (1)
481 Views
1 Reply
Reply (1)
Message 2 of 2

daniel_cadext
Advisor
Advisor
Accepted solution

Yeah, you have to link with acad’s libraries, which are release, and linked with release MFC/CRT.
So basically, your local modules will need to be pseudo debug, compiler optimizations turned off, export debug info.
Check out one of the samples in the SDK.

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
0 Likes