<?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: warning C4005: 'DLLIMPEXP' : macro redefinition  ??? in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578840#M16937</link>
    <description>&amp;gt; Which one is meant to be defined? Am I supposed to run all database &lt;BR /&gt;
&amp;gt; transactions from the DBX project?&lt;BR /&gt;
&lt;BR /&gt;
  The ARX project should have TOOLARX_MODULE defined, and the DBX project &lt;BR /&gt;
should have TOOLDBX_MODULE defined.  You can call acdb functions from either &lt;BR /&gt;
module; you just can't call non-acdb functions from the DBX module.  You &lt;BR /&gt;
might be best served to start over and let the wizard generate both projects &lt;BR /&gt;
for you.&lt;BR /&gt;
-- &lt;BR /&gt;
Owen Wengerd&lt;BR /&gt;
President, ManuSoft &lt;&gt;&lt;BR /&gt;
VP Americas, CADLock, Inc. &lt;&gt;&lt;/&gt;&lt;/&gt;</description>
    <pubDate>Tue, 27 Oct 2009 07:05:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-10-27T07:05:12Z</dc:date>
    <item>
      <title>warning C4005: 'DLLIMPEXP' : macro redefinition  ???</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578837#M16934</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Would someone know why I am getting the following warning: "warning C4005: 'DLLIMPEXP' : macro redefinition". I have a ARX project and a DBX project. But when I added a custom object to the DBX this warning appeared. Everything appears to run correctly. But I must be doing something wrong.&lt;BR /&gt;
&lt;BR /&gt;
The wizard generated code in the ARX is redefining DLLIMPEXP from the DBX.  &lt;BR /&gt;
&lt;BR /&gt;
{code} &lt;BR /&gt;
#ifdef TOOLARX_MODULE&lt;BR /&gt;
#define DLLIMPEXP __declspec(dllexport)&lt;BR /&gt;
#else&lt;BR /&gt;
//----- Note: we don't use __declspec(dllimport) here, because of the&lt;BR /&gt;
//----- "local vtable" problem with msvc. If you use __declspec(dllimport),&lt;BR /&gt;
// ...&lt;BR /&gt;
//----- memory indefinitely, there is no problem with vtables unexpectedly&lt;BR /&gt;
//----- going away.&lt;BR /&gt;
#define DLLIMPEXP&lt;BR /&gt;
#endif&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
#ifdef TOOLDBX_MODULE&lt;BR /&gt;
#define DLLIMPEXP __declspec(dllexport)&lt;BR /&gt;
#else&lt;BR /&gt;
//----- Note: we don't use __declspec(dllimport) here, because of the&lt;BR /&gt;
//----- "local vtable" problem with msvc. If you use __declspec(dllimport),&lt;BR /&gt;
// ...&lt;BR /&gt;
//----- memory indefinitely, there is no problem with vtables unexpectedly&lt;BR /&gt;
//----- going away.&lt;BR /&gt;
#define DLLIMPEXP&lt;BR /&gt;
#endif&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
I am not sure of how the generated code is meant to work so I am not sure how I should fix it.&lt;BR /&gt;
Could anyone point me in the right direction?&lt;BR /&gt;
&lt;BR /&gt;
Thank you&lt;BR /&gt;
&lt;BR /&gt;
Joseph</description>
      <pubDate>Mon, 26 Oct 2009 19:20:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578837#M16934</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-26T19:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: warning C4005: 'DLLIMPEXP' : macro redefinition  ???</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578838#M16935</link>
      <description>In a given project, either TOOLARX_MODULE or TOOLDBX_MODULE should be &lt;BR /&gt;
defined, never both.  The error indicates that both are defined.&lt;BR /&gt;
-- &lt;BR /&gt;
Owen Wengerd&lt;BR /&gt;
President, ManuSoft &lt;&gt;&lt;BR /&gt;
VP Americas, CADLock, Inc. &lt;&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Joseph_L" wrote in message news:6278290@discussion.autodesk.com...&lt;BR /&gt;
&amp;gt; Hi,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Would someone know why I am getting the following warning: "warning C4005: &lt;BR /&gt;
&amp;gt; 'DLLIMPEXP' : macro redefinition". I have a ARX project and a DBX project. &lt;BR /&gt;
&amp;gt; But when I added a custom object to the DBX this warning appeared. &lt;BR /&gt;
&amp;gt; Everything appears to run correctly. But I must be doing something wrong.&lt;BR /&gt;
&amp;gt; [...]&lt;/&gt;&lt;/&gt;</description>
      <pubDate>Mon, 26 Oct 2009 21:35:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578838#M16935</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-26T21:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: warning C4005: 'DLLIMPEXP' : macro redefinition  ???</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578839#M16936</link>
      <description>Thank you Owen,&lt;BR /&gt;
&lt;BR /&gt;
I have been checking out what you said. I see that both TOOLARX_MODULE and TOOLDBX_MODULE are defined in the preprocessor definitions.&lt;BR /&gt;
&lt;BR /&gt;
I removed the TOOLARX_MODULE definition and it compiled without any warnings but then the program crashed when it hit the acdbTransactionManager-&amp;gt;startTransaction() command. This code is in the ARX project. (should it be in the DBX project?)&lt;BR /&gt;
&lt;BR /&gt;
I also tried removing the TOOLDBX_MODULE definition but this resulted in a lot of linker errors so I am thinking that this is not the correct thing to do.&lt;BR /&gt;
&lt;BR /&gt;
Which one is meant to be defined? Am I supposed to run all database transactions from the DBX project?&lt;BR /&gt;
&lt;BR /&gt;
In previous plugins I had both the ARX_MODULE and DBX_MODULE defined and I preformed the transactions through the ARX project and it worked ok. (You understand this is all a steep learning curve for me!)&lt;BR /&gt;
&lt;BR /&gt;
Thank you!&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
&lt;BR /&gt;
Joseph</description>
      <pubDate>Mon, 26 Oct 2009 23:50:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578839#M16936</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-26T23:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: warning C4005: 'DLLIMPEXP' : macro redefinition  ???</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578840#M16937</link>
      <description>&amp;gt; Which one is meant to be defined? Am I supposed to run all database &lt;BR /&gt;
&amp;gt; transactions from the DBX project?&lt;BR /&gt;
&lt;BR /&gt;
  The ARX project should have TOOLARX_MODULE defined, and the DBX project &lt;BR /&gt;
should have TOOLDBX_MODULE defined.  You can call acdb functions from either &lt;BR /&gt;
module; you just can't call non-acdb functions from the DBX module.  You &lt;BR /&gt;
might be best served to start over and let the wizard generate both projects &lt;BR /&gt;
for you.&lt;BR /&gt;
-- &lt;BR /&gt;
Owen Wengerd&lt;BR /&gt;
President, ManuSoft &lt;&gt;&lt;BR /&gt;
VP Americas, CADLock, Inc. &lt;&gt;&lt;/&gt;&lt;/&gt;</description>
      <pubDate>Tue, 27 Oct 2009 07:05:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578840#M16937</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-27T07:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: warning C4005: 'DLLIMPEXP' : macro redefinition  ???</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578841#M16938</link>
      <description>Owen,&lt;BR /&gt;
&lt;BR /&gt;
Thank you for the reply!&lt;BR /&gt;
&lt;BR /&gt;
I have been looking further into this issue. I created a new solution as you suggested but the problem was reproduced. &lt;BR /&gt;
&lt;BR /&gt;
To explain briefly what I did: I made a ARX module and created in that a Transaction reactor and then I made a DBX module and created a custom object in that. So far so good. If you compile this there is no warnings or errors. But when I include the custom object header file in any one of the header files of the ARX I get this macro redefinition warning. If I only include it in the .cpp files, no problems. but this is no good to me because I use the custom object in a header file. I also just tried to predeclare the custom object class but it was not good enough either as I declare a custom object in an ARX class, and I therefore get a "uses undefined class" error.&lt;BR /&gt;
&lt;BR /&gt;
I suppose I could use a pointer to the custom object in my ARX class and I imagine this would then work. But I think my problem is that I am not including the DBX module correctly in the ARX. Can I include the DBX custom object in the header of an ARX file? And if so how? I looked through the samples and they only include it in the .cpp file. &lt;BR /&gt;
&lt;BR /&gt;
Thank you again.&lt;BR /&gt;
&lt;BR /&gt;
Joseph</description>
      <pubDate>Tue, 03 Nov 2009 19:41:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578841#M16938</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-11-03T19:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: warning C4005: 'DLLIMPEXP' : macro redefinition  ???</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578842#M16939</link>
      <description>Joseph:&lt;BR /&gt;
&lt;BR /&gt;
  I decided to test, so I created an ARX and DBX project with the wizard, &lt;BR /&gt;
added a custom object to the DBX and a class to the ARX, then included the &lt;BR /&gt;
custom object's header file in the ARX class' header file.  As expected, &lt;BR /&gt;
this builds with no errors.  I used ObjectARX 2010 with the latest version &lt;BR /&gt;
of the wizard.&lt;BR /&gt;
-- &lt;BR /&gt;
Owen Wengerd&lt;BR /&gt;
President, ManuSoft &lt;&gt;&lt;BR /&gt;
VP Americas, CADLock, Inc. &lt;&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Joseph_L" wrote in message news:6282968@discussion.autodesk.com...&lt;BR /&gt;
&amp;gt; Owen,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thank you for the reply!&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I have been looking further into this issue. I created a new solution as &lt;BR /&gt;
&amp;gt; you suggested but the problem was reproduced.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; To explain briefly what I did: I made a ARX module and created in that a &lt;BR /&gt;
&amp;gt; Transaction reactor and then I made a DBX module and created a custom &lt;BR /&gt;
&amp;gt; object in that. So far so good. If you compile this there is no warnings &lt;BR /&gt;
&amp;gt; or errors. But when I include the custom object header file in any one of &lt;BR /&gt;
&amp;gt; the header files of the ARX I get this macro redefinition warning. If I &lt;BR /&gt;
&amp;gt; only include it in the .cpp files, no problems. but this is no good to me &lt;BR /&gt;
&amp;gt; because I use the custom object in a header file. I also just tried to &lt;BR /&gt;
&amp;gt; predeclare the custom object class but it was not good enough either as I &lt;BR /&gt;
&amp;gt; declare a custom object in an ARX class, and I therefore get a "uses &lt;BR /&gt;
&amp;gt; undefined class" error.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I suppose I could use a pointer to the custom object in my ARX class and I &lt;BR /&gt;
&amp;gt; imagine this would then work. But I think my problem is that I am not &lt;BR /&gt;
&amp;gt; including the DBX module correctly in the ARX. Can I include the DBX &lt;BR /&gt;
&amp;gt; custom object in the header of an ARX file? And if so how? I looked &lt;BR /&gt;
&amp;gt; through the samples and they only include it in the .cpp file.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thank you again.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Joseph&lt;/&gt;&lt;/&gt;</description>
      <pubDate>Wed, 04 Nov 2009 14:13:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578842#M16939</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-11-04T14:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: warning C4005: 'DLLIMPEXP' : macro redefinition  ???</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578843#M16940</link>
      <description>Owen,&lt;BR /&gt;
&lt;BR /&gt;
That is interesting! So it would seem that something is wrong with my configuration / wizard. Well one difference is that I am working in AutoCAD 2009 / ObjectArx 2009. But I would imagine that this should work the same as 2010. ? &lt;BR /&gt;
&lt;BR /&gt;
I believe I am using the latest wizard for 2009, I got it in January of this year.&lt;BR /&gt;
&lt;BR /&gt;
Well, I much appreciate your comments. At least I know that it should work! &lt;BR /&gt;
&lt;BR /&gt;
I'll make a follow up post if I can figure out what is causing this problem.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again.&lt;BR /&gt;
&lt;BR /&gt;
Joseph</description>
      <pubDate>Wed, 04 Nov 2009 14:48:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578843#M16940</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-11-04T14:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: warning C4005: 'DLLIMPEXP' : macro redefinition  ???</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578844#M16941</link>
      <description>It's possible that there was a bug in the 2009 wizard, but I'm not aware &lt;BR /&gt;
of one that would cause this.  I think the most likely explanation is that &lt;BR /&gt;
you are doing something incorrectly, or at least unexpected, that causes it.&lt;BR /&gt;
-- &lt;BR /&gt;
Owen Wengerd&lt;BR /&gt;
President, ManuSoft &lt;&gt;&lt;BR /&gt;
VP Americas, CADLock, Inc. &lt;&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Joseph_L" wrote in message news:6283480@discussion.autodesk.com...&lt;BR /&gt;
&amp;gt; Owen,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; That is interesting! So it would seem that something is wrong with my &lt;BR /&gt;
&amp;gt; configuration / wizard. Well one difference is that I am working in &lt;BR /&gt;
&amp;gt; AutoCAD 2009 / ObjectArx 2009. But I would imagine that this should work &lt;BR /&gt;
&amp;gt; the same as 2010. ?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I believe I am using the latest wizard for 2009, I got it in January of &lt;BR /&gt;
&amp;gt; this year.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Well, I much appreciate your comments. At least I know that it should &lt;BR /&gt;
&amp;gt; work!&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I'll make a follow up post if I can figure out what is causing this &lt;BR /&gt;
&amp;gt; problem.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks again.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Joseph&lt;/&gt;&lt;/&gt;</description>
      <pubDate>Wed, 04 Nov 2009 15:59:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578844#M16941</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-11-04T15:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: warning C4005: 'DLLIMPEXP' : macro redefinition  ???</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578845#M16942</link>
      <description>Owen is correct. As far I understand the issue there is 2 projects TOOLARX and TOOLDBX which define exports. The TOOLARX project or a third project probably includes the TOOLDBX .h file which defines the DLLIMPEXP symbol, but since TOOLARX is not supposed to define the TOOLDBX_MODULE symbol, that should not cause any problem. If you are seeing that error, it means you have that symbol define in your project setting (or .h). Please remove it since the TOOLDBX_MODULE symbol should be present only in the TOOLDBX_MODULE project.&lt;BR /&gt;
&lt;BR /&gt;
Cheers&lt;BR /&gt;
cyrille</description>
      <pubDate>Thu, 05 Nov 2009 09:41:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578845#M16942</guid>
      <dc:creator>cyrille_fauvel</dc:creator>
      <dc:date>2009-11-05T09:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: warning C4005: 'DLLIMPEXP' : macro redefinition  ???</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578846#M16943</link>
      <description>Cyrille,&lt;BR /&gt;
&lt;BR /&gt;
Thank you! Base on what you and Owen were saying I re-examined the setup. And I believe I figured out the problem. What threw me off is that both of you were saying that the TOOLDBX_MODULE should not be defined in the ARX module. But I did not have the TOOLDBX_MODULE defined in the ARX only in the DBX. The problem seems to be that the TOOLARX_MODULE was defined in the ARX module and then the DBX module was included in a header file of  the ARX module. therefore this would cause the DLLIMPEXP to be redefined. I tried to remove the  TOOLARX_MODULE definition from the preprocessor definitions before but the program would crash when it hit the acdbTransactionManager-&amp;gt;startTransaction() command. I have since reworked my transactions and this time I get no problems. &lt;BR /&gt;
&lt;BR /&gt;
Does this sound correct?&lt;BR /&gt;
&lt;BR /&gt;
Thank you for all your help!&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
&lt;BR /&gt;
Joseph</description>
      <pubDate>Thu, 05 Nov 2009 19:31:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578846#M16943</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-11-05T19:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: warning C4005: 'DLLIMPEXP' : macro redefinition  ???</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578847#M16944</link>
      <description>&amp;gt; Does this sound correct?&lt;BR /&gt;
&lt;BR /&gt;
  No.  I think you should spend some time to understand what the DLLIMPEXP &lt;BR /&gt;
macro does and how it is intended to work.  Once you understand it, you &lt;BR /&gt;
should be able to methodically track down the cause of your error without &lt;BR /&gt;
resorting to speculation.&lt;BR /&gt;
-- &lt;BR /&gt;
Owen Wengerd&lt;BR /&gt;
President, ManuSoft &lt;&gt;&lt;BR /&gt;
VP Americas, CADLock, Inc. &lt;&gt;&lt;/&gt;&lt;/&gt;</description>
      <pubDate>Fri, 06 Nov 2009 04:01:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/warning-c4005-dllimpexp-macro-redefinition/m-p/2578847#M16944</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-11-06T04:01:27Z</dc:date>
    </item>
  </channel>
</rss>

