<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Visual C++ Configurartion for External libray</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/849c7d1617/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/849c7d1617/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/849c7d1617/</id><updated>2020-02-27T23:15:52.413000Z</updated><subtitle>Recent posts to Visual C++ Configurartion for External libray</subtitle><entry><title>Visual C++ Configurartion for External libray</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/849c7d1617/?limit=25#92f0" rel="alternate"/><published>2020-02-27T23:15:52.413000Z</published><updated>2020-02-27T23:15:52.413000Z</updated><author><name>asifdip</name><uri>https://forge.codesys.com/u/asifdip/</uri></author><id>https://forge.codesys.comb2763c5036b3fc38f30298be6dc46692972ed615</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
At first i have create an external libary with FUNCTION BLOCK.I am using  "Codesys SP RTE target system"&lt;br/&gt;
I have some problems to implement my C function (via Visual c++) in Codesy 2.3.Normally when I have created Visaul C++ project at the end I have Biuld it.&lt;br/&gt;
After Build there are two errors.&lt;br/&gt;
&lt;strong&gt;MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1&amp;gt;C:\Documents and Settings\lsk-ad\My Documents\Visual Studio 2008\Projects\SOME_FUNCTION\Debug\SOME_FUNCTION.exe : fatal error LNK1120: 1 unresolved externals&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;But when i Compile it, There is No error. As concerning to manual, I have copy both &amp;lt;library&amp;gt;.obj (visual c++) and  &amp;lt;library&amp;gt;.Lib in Library directory. If i add them in a project; But it does not work. I have no problem to Codesys and I can also build the Codesys Project. but Only External library has no output.&lt;br/&gt;
 I have done all configuration as like &lt;strong&gt;"Creating &amp;amp; linking External C library functions"&lt;/strong&gt; manual in Visual C++.&lt;br/&gt;
Thanks&lt;br/&gt;
asif&amp;lt;/library&amp;gt;&amp;lt;/library&amp;gt;&lt;/p&gt;
&lt;p&gt;Still I can not also understand what is Module  &lt;strong&gt;RtsCts.C&lt;/strong&gt; ? &lt;br/&gt;
And It is important to Use this portion at the End of &amp;lt;library&amp;gt;. C  part in Visual c++ .&amp;lt;/library&amp;gt;&lt;/p&gt;
&lt;p&gt;static ExtRef CstExtRefTable[] = &lt;br/&gt;
{ &lt;br/&gt;
/&lt;em&gt;{Function-name (max. 31 chars), Function-pointer}&lt;/em&gt;/ &lt;br/&gt;
  {"Dummy", (void (*)())CstDummy}, &lt;br/&gt;
 {"", NULL} &lt;br/&gt;
};&lt;/p&gt;
&lt;p&gt;ExtRef* CstGetExtRefTable(void) &lt;br/&gt;
{ &lt;br/&gt;
return CstExtRefTable; &lt;br/&gt;
}&lt;br/&gt;
But already try it with my function name but same library has no output &lt;br/&gt;
Please give me suggestion how i can fix this problem or whats the procedure.Still i am trying.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>