Hi, I am working on a project with C++, and there is a old ordinary equation integrator named lsode written in fortran, I'd like to call its subrutine in C++.
I followed the instruction on this link to Configue Microsoft Visual Studio 2010.(vv=12 for me.)
And then creat a solution with one C++ project and one fortran static library projbec, as in:
Set the dependency and start up project. Also explicitly provide the path to the Fortran library, in the C/C++ project's Linker > Additional Dependencies property, or as a "source file" in the project, like Steve said!
I test a "hello world! " program written in fortran and called in C++, it works perfectly!
But when I follow the procedure above and incorporate the old fortran code(a simple test), I got the error:
1>lsode_init.obj : error LNK2001: unresolved external symbol _ckstrt_
1>main.obj : error LNK2019: unresolved external symbol _chemkininitialize_ referenced in function _main
Below is my source codes:
I upload every source file, global_extern_vars.h contains the extern "C" stuff, use_chemkin.f is a wrapper to the old fortran codes.
Hope someone could help me.(I have worked on this problem for one week, my boss got unhappy with me as He bought VS2010 and intel fortran complier but I don't know how to use...). It would be really appreciated if u could help to fix it.