Hmm - I am suspecting that the makefile might be missing some things, but am not sure what. Some things that I had to add to my MSVC++ project to get it to compile were:
Try adding these to the makefile to see whether this helps.
I'm able to build sim.exe (branch 112.x) adding to makefile:
SOURCES += simunits.cc
SOURCES += convoy.cc
SOURCES += utils/float32e8_t.cc
SOURCES += path_explorer.cc
SOURCES += gui/components/gui_component_table.cc
SOURCES += gui/components/gui_table.cc
SOURCES += gui/components/gui_convoy_assembler.cc
SOURCES += gui/components/gui_convoy_label.cc
SOURCES += gui/replace_frame.cc
SOURCES += dataobj/livery_scheme.cc
SOURCES += dataobj/replace_data.cc
I do not know if they are all necessary as I am not an expert on makefiles.
The program compile and I don't have the "alloca" error.
Adding SOURCES += script/api/api_gui.cc (as you suggest) I obtain the error in attach.