Hi,
At first i have create an external libary with FUNCTION BLOCK.I am using "Codesys SP RTE target system"
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.
After Build there are two errors. MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>C:\Documents and Settings\lsk-ad\My Documents\Visual Studio 2008\Projects\SOME_FUNCTION\Debug\SOME_FUNCTION.exe : fatal error LNK1120: 1 unresolved externals
But when i Compile it, There is No error. As concerning to manual, I have copy both <library>.obj (visual c++) and <library>.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.
I have done all configuration as like "Creating & linking External C library functions" manual in Visual C++.
Thanks
asif</library></library>
Still I can not also understand what is Module RtsCts.C ?
And It is important to Use this portion at the End of <library>. C part in Visual c++ .</library>
ExtRef* CstGetExtRefTable(void)
{
return CstExtRefTable;
}
But already try it with my function name but same library has no output
Please give me suggestion how i can fix this problem or whats the procedure.Still i am trying.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
At first i have create an external libary with FUNCTION BLOCK.I am using "Codesys SP RTE target system"
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.
After Build there are two errors.
MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>C:\Documents and Settings\lsk-ad\My Documents\Visual Studio 2008\Projects\SOME_FUNCTION\Debug\SOME_FUNCTION.exe : fatal error LNK1120: 1 unresolved externals
But when i Compile it, There is No error. As concerning to manual, I have copy both <library>.obj (visual c++) and <library>.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.
I have done all configuration as like "Creating & linking External C library functions" manual in Visual C++.
Thanks
asif</library></library>
Still I can not also understand what is Module RtsCts.C ?
And It is important to Use this portion at the End of <library>. C part in Visual c++ .</library>
static ExtRef CstExtRefTable[] =
{
/{Function-name (max. 31 chars), Function-pointer}/
{"Dummy", (void (*)())CstDummy},
{"", NULL}
};
ExtRef* CstGetExtRefTable(void)
{
return CstExtRefTable;
}
But already try it with my function name but same library has no output
Please give me suggestion how i can fix this problem or whats the procedure.Still i am trying.