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

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Arnab Sikidar
Posts: 9
Joined: Thu Sep 21, 2017 1:53 am

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

Post by Arnab Sikidar » Wed Aug 15, 2018 11:10 pm

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

Tags:

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

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

Post by jimmy d » Thu Aug 16, 2018 9:18 am

There seems to be some posts on this in Stack Overflow

User avatar
Arnab Sikidar
Posts: 9
Joined: Thu Sep 21, 2017 1:53 am

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

Post by Arnab Sikidar » Thu Aug 16, 2018 10:31 pm

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

User avatar
Arnab Sikidar
Posts: 9
Joined: Thu Sep 21, 2017 1:53 am

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

Post by Arnab Sikidar » Thu Aug 23, 2018 10:44 am

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

POST REPLY