Book a Demo

Author Topic: Getting link error LNK2019 when Generate, Build, Run.. of Executable StateMachin  (Read 2380 times)

mse

  • EA User
  • **
  • Posts: 308
  • Karma: +1/-0
    • View Profile
I'm getting a link error regarding a missing main when trying to build an artifact for an executable state machine.

LIBCMT.lib(crt0.obj) : error LNK2019: undefined reference to an external symbol "_main" in function "___tmainCRTStartup".   

I thought this main would be generated by EA, but it doesn't seem so. I tried using the example in the user guide PDF titled "executable-state-machines.pdf" which gives a TransactionServer example on page 21.

NOTE: I am using Registered Enterprise Architect (Corporate Edition), if that matters regarding features available.
« Last Edit: March 19, 2019, 08:06:56 pm by mse »

bknoth2

  • EA User
  • **
  • Posts: 129
  • Karma: +2/-0
    • View Profile
You need to create your own. Here's one that can go in ConsoleManger.cpp:


int main() {
   ConsoleManager manager;
   manager.initialize();
   manager.Run();
   return 0;
}