<?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: Use function  from other Project? in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10837034#M2880</link>
    <description>I don't know what your project's name is which contains HALLO.h, so just call it Hello, maybe it is a wrong name, you must change it to correct.&lt;BR /&gt;You can add to code as below to the top in your file B, change the full path to the real .&lt;BR /&gt;#pragma comment(lib,"C:\\Test\\ProjectName.lib")</description>
    <pubDate>Wed, 22 Dec 2021 01:10:27 GMT</pubDate>
    <dc:creator>hbxiaogui</dc:creator>
    <dc:date>2021-12-22T01:10:27Z</dc:date>
    <item>
      <title>Use function  from other Project?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10833592#M2874</link>
      <description>&lt;P&gt;Problem:&lt;/P&gt;&lt;P&gt;I create 2 Arx files and in file A I have a function in a cpp and an h for it. With a class. Here is the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;cpp-Datei (HALLO.CPP)
#include "StdAfx.h"
#include "HALLO.h"

void SAY::HALLO()
{
	acutPrintf(_T("\nHALLO"));
}

h-Datei (HALLO.H)
#ifndef HALLO_H
#define HALLO_H

class SAY
{
public:
	void HALLO();
protected:
};

#endif&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;In the same project file this works with:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;SAY SAY;
SAY.HALLO();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;But I would like to call the function from file B in the acrxEntryPoint.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;I used:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;#include "..\HALLO\HALLO.h"

...

SAY SAY;
SAY.HALLO();&lt;/LI-CODE&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;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;but when I compile it spits out a fatal error LNK1120: 1 unresolved externals.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN&gt;Why?&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN&gt;Or how do I have to call the function then?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 13:25:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10833592#M2874</guid>
      <dc:creator>daniel_gearloose</dc:creator>
      <dc:date>2021-12-20T13:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Use function  from other Project?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10834711#M2875</link>
      <description>&lt;P&gt;yeah, you have to link them.&lt;/P&gt;&lt;P&gt;kind of a hack, but you can use acedInvoke to pass data between two loaded arx modules, just as you can call a lisp function from arx.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 23:59:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10834711#M2875</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2021-12-20T23:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Use function  from other Project?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10835336#M2876</link>
      <description>&lt;P&gt;Sorry, you got me wrong. I ment from another Project in same Solution. I can't understand why this is a Problem.&lt;/P&gt;&lt;P&gt;Maybe anything with linking? But it is also nice to know that acedInvoke can call ARX-Commands. From calling Lisp commands I heard and used it once in C#.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 08:08:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10835336#M2876</guid>
      <dc:creator>daniel_gearloose</dc:creator>
      <dc:date>2021-12-21T08:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Use function  from other Project?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10835706#M2877</link>
      <description>&lt;P&gt;I think you should link Hello.lib to the caller project.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 12:31:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10835706#M2877</guid>
      <dc:creator>hbxiaogui</dc:creator>
      <dc:date>2021-12-21T12:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Use function  from other Project?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10836760#M2878</link>
      <description>&lt;P&gt;hmmm.... i tryed that... ok, i will try it again...&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 21:33:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10836760#M2878</guid>
      <dc:creator>daniel_gearloose</dc:creator>
      <dc:date>2021-12-21T21:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Use function  from other Project?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10836783#M2879</link>
      <description>&lt;P class=""&gt;LINK : fatal error LNK1181: cannot open input file 'Hello.lib'&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 21:47:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10836783#M2879</guid>
      <dc:creator>daniel_gearloose</dc:creator>
      <dc:date>2021-12-21T21:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Use function  from other Project?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10837034#M2880</link>
      <description>I don't know what your project's name is which contains HALLO.h, so just call it Hello, maybe it is a wrong name, you must change it to correct.&lt;BR /&gt;You can add to code as below to the top in your file B, change the full path to the real .&lt;BR /&gt;#pragma comment(lib,"C:\\Test\\ProjectName.lib")</description>
      <pubDate>Wed, 22 Dec 2021 01:10:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10837034#M2880</guid>
      <dc:creator>hbxiaogui</dc:creator>
      <dc:date>2021-12-22T01:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Use function  from other Project?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10859417#M2881</link>
      <description>&lt;P&gt;If you want to call a function that is implemented in module A from a different module B then module A must export the function. Otherwise it is only callable in A internally. The same holds for the usage of classes.&lt;/P&gt;
&lt;P&gt;It's a bit tricky in C++. I recommend to read this:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://stackoverflow.com/questions/6840576/how-to-export-a-c-class-from-a-dll" target="_blank" rel="noopener"&gt;https://stackoverflow.com/questions/6840576/how-to-export-a-c-class-from-a-dll&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.microsoft.com/en-us/cpp/cpp/using-dllimport-and-dllexport-in-cpp-classes?view=msvc-170" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/cpp/cpp/using-dllimport-and-dllexport-in-cpp-classes?view=msvc-170&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 13:07:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/use-function-from-other-project/m-p/10859417#M2881</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2022-01-05T13:07:50Z</dc:date>
    </item>
  </channel>
</rss>

