I have a Fortran static library project which is linked to C/C++ program (tried both, pure C and C++). My goal is to execute Fortran code from my C/C++ program and in case there is any error get the traceback information. I am using Visual Studio 2010 with Intel Visual Fortran Studio XE 2013 to build everything.
The problem is that when there is an error in the Fortran code my program crash (which is fine), but I can't get the traceback. However, when I invoke my subroutines from a Fortran program (the main program is a Fortran code), then I get traceback information.
The Fortran static lib is compiled with the following parameters (just the most important): /debug:full /Od /traceback /check:bounds /check:stack /libs:static /threads /dbglibs /c
I found in the documentation that I have to initialize the Fortran runtime library, so that Fortran error handlers are established. I added invocation of for_rtl_init_ in the main() of my C/C++ code, however this doesn't work. The documentation of the for_rtl_init_ subroutine says that it only assigns the Fortran error handlers for Linux and OS X. How can I do that for Windows?