<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: _DEBUG symbol preprocessor - significance in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13396887#M95</link>
    <description>&lt;P&gt;Thanks again&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8575899"&gt;@daniel_cadext&lt;/a&gt;&amp;nbsp;. I think I get it now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Correct me if I am wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I was a autocad (aka autodesk) developer programming the actual acad.exe or allied DLLs, _DEBUG may be valid.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But since we work out of Release CRT of acad.exe, and we use still Visual Studio for ARX, it is better off not to use _DEBUG.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you said by using a MY_DEBUG, we have a 'local' debug build of our ARX on top on 'global' release build of acad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now it makes sense.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I wonder what will happen if I use _DEBUG in arx despite all these warnings. Let me try. LOL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But topic closed for me as of now.&amp;nbsp;Thanks again.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Mar 2025 18:54:46 GMT</pubDate>
    <dc:creator>ranga.narasimhan</dc:creator>
    <dc:date>2025-03-28T18:54:46Z</dc:date>
    <item>
      <title>_DEBUG symbol preprocessor - significance</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13384072#M88</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain what exactly this paragraph means or what the significance is? Although I have done few ARX code before, I always had problems when I add / remove headers even a little bit away from the standard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ranganarasimhan_0-1742582244000.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1480445iDE1DA291E7D3A325/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ranganarasimhan_0-1742582244000.png" alt="ranganarasimhan_0-1742582244000.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Ranga&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 18:38:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13384072#M88</guid>
      <dc:creator>ranga.narasimhan</dc:creator>
      <dc:date>2025-03-21T18:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: _DEBUG symbol preprocessor - significance</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13384719#M89</link>
      <description>&lt;P&gt;&amp;nbsp;DEBUG links with other libraries built in DEBUG mode and may use the DEBUG C run-time library.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Some C run-time functions and C++ operators behave differently when called from a debug build of an application."&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/cpp/c-runtime-library/debug-routines?view=msvc-170" target="_blank"&gt;https://learn.microsoft.com/en-us/cpp/c-runtime-library/debug-routines?view=msvc-170&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AutoCAD and the Object ARX libraries are built in release mode, linked with the Release CRT, so you should not mix the two.&lt;/P&gt;&lt;P&gt;I haven't used it myself, but I believe it adds a wrapper, where DEBUG can be defined within a limited scope and will also trigger a compiler warning.&lt;/P&gt;&lt;P&gt;Typically, I add my own preprocessor definition to the Debug configuration, e.g., PYRXDEBUG=1. This allows you to create custom assert and logging macros.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Mar 2025 08:52:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13384719#M89</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2025-03-22T08:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: _DEBUG symbol preprocessor - significance</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13386412#M90</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8575899"&gt;@daniel_cadext&lt;/a&gt;&amp;nbsp;for the detailed response. That kinda explain things. But my question's intent was to understand why they mention that we should NOT use Microsoft / Autodesk header in the Stdafx.h when _DEBUG is defined.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The never completely understood Stdafx.h &amp;amp; Stdarx.h fully. I know they are something to do with PCH (pre-compiled headers). But still i'm in fog.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ranganarasimhan_0-1742793890432.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1480801iAC1CE46D088B544A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ranganarasimhan_0-1742793890432.png" alt="ranganarasimhan_0-1742793890432.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 05:27:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13386412#M90</guid>
      <dc:creator>ranga.narasimhan</dc:creator>
      <dc:date>2025-03-24T05:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: _DEBUG symbol preprocessor - significance</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13386450#M91</link>
      <description>&lt;P&gt;because, windows/Autodesk headers can include stuff like&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#if defined(_DEBUG)
    #pragma comment( lib , "win_debug.lib" )
#else
    #pragma comment( lib , "win_release.lib" )
#endif&lt;/LI-CODE&gt;&lt;P&gt;If _DEBUG is defined. you would be linking with the DEBUG CRT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it's a scope&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#define _DEBUG //begin scope
// include your headers here, but nothing that may link 
#undef  _DEBUG // end scope&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 07:55:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13386450#M91</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2025-03-24T07:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: _DEBUG symbol preprocessor - significance</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13388145#M92</link>
      <description>&lt;P&gt;Thx. Yes I get that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought the warning in the ObjectARX wizard had something else to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My understanding was that, as long as all the libraries belong to the 'same type', either debug or release, then we should be fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, what is the harm in linking a debug release of an ObjectARX with a DEBUG CRT (windows / autodesk) libraries? Is there any conflict? Are we not supposed to ship our ARX files with debug CRT. I know that the ARX file size will blow up with debug libraries. Apart from this, any other problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Thx&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 22:14:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13388145#M92</guid>
      <dc:creator>ranga.narasimhan</dc:creator>
      <dc:date>2025-03-24T22:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: _DEBUG symbol preprocessor - significance</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13388212#M93</link>
      <description>&lt;P&gt;"My understanding was that, as long as all the libraries belong to the 'same type', either debug or release, then we should be fine."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right, if you have a DEBUG build of AutoCAD and the ARX SDK, you should be good&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 23:30:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13388212#M93</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2025-03-24T23:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: _DEBUG symbol preprocessor - significance</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13388223#M94</link>
      <description>&lt;P&gt;If you’re using the ARX wizard to setup your project. Then the Debug configuration isn’t really debug, more like a pseudo debug. It’s actually a release build with all the optimizations turned off and the PDB generation turned on. &amp;nbsp;_DEBUG is not defined though, and you’re still linking with the Release CRT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You get the nice big bloaty DLL, that you can step into with your debugger and all that goodness, heck you can even ship it. You can add your own definition I.e. MY_DEBUG to put your own conditionals&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"If it walks like a duck and it quacks like a duck, then it must be a duck"&amp;nbsp; its duck debug &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Just don’t define _DEBUG and all your ducks will be in a row&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 23:47:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13388223#M94</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2025-03-24T23:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: _DEBUG symbol preprocessor - significance</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13396887#M95</link>
      <description>&lt;P&gt;Thanks again&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8575899"&gt;@daniel_cadext&lt;/a&gt;&amp;nbsp;. I think I get it now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Correct me if I am wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I was a autocad (aka autodesk) developer programming the actual acad.exe or allied DLLs, _DEBUG may be valid.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But since we work out of Release CRT of acad.exe, and we use still Visual Studio for ARX, it is better off not to use _DEBUG.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you said by using a MY_DEBUG, we have a 'local' debug build of our ARX on top on 'global' release build of acad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now it makes sense.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I wonder what will happen if I use _DEBUG in arx despite all these warnings. Let me try. LOL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But topic closed for me as of now.&amp;nbsp;Thanks again.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2025 18:54:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/debug-symbol-preprocessor-significance/m-p/13396887#M95</guid>
      <dc:creator>ranga.narasimhan</dc:creator>
      <dc:date>2025-03-28T18:54:46Z</dc:date>
    </item>
  </channel>
</rss>

