Page 1 of 1

Error while building C++ code in MS Visual Studio for API Development

Posted: Wed Aug 15, 2018 11:10 pm
by arnab.sikidar
Hi everyone,

I wrote a code in C++ for development of API in Visual Studio 2017 for OpenSim. But on building the code, I am encountering a error stating as follows:
Severity Code Description
Error LNK2019 unresolved external symbol main referenced in function
"int __cdecl __scrt_common_main_seh(void)" (?
__scrt_common_main_seh@@YAHXZ)

And

Severity Code Description
Error LNK1120 1 unresolved externals

I even tried building the code of Thelen Muscle Class from the source file of OpenSim in visual studio 2017 in order to debug it and still getting the same set of error. Kindly help me in this regard.

Thanks and Regards

Re: Error while building C++ code in MS Visual Studio for API Development

Posted: Thu Aug 16, 2018 9:18 am
by jimmy
There seems to be some posts on this in Stack Overflow

Re: Error while building C++ code in MS Visual Studio for API Development

Posted: Thu Aug 16, 2018 10:31 pm
by arnab.sikidar
Hello James,

Thanks for the prompt reply, however, there is no main() in Thelen Muscle Class of OpenSim (from the source code) and is same for my code too. I found a link in SimTK addressing the error but it was not much of help. Here is the link that I referred.

viewtopicPhpbb.php?f=91&t=4671&p=0&start=0&view=

Kindly help me in this regard.

Thanks

Arnab

Re: Error while building C++ code in MS Visual Studio for API Development

Posted: Thu Aug 23, 2018 10:44 am
by arnab.sikidar
jimmy wrote:
Thu Aug 16, 2018 9:18 am
There seems to be some posts on this in Stack Overflow
Thanks James. I could solve the issue. It was because of 64 bit usage of OpenSim libraries.


Regards

Arnab