Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Mix language problem

Zhanghong_T_
Novice
451 Views
Hi all,
I am trying to create a project which includes both Fortran and C++ source files with Fortran main file. However, When compiling the project, these C++ files are not compiled, which in turn leads to compile error: unresolved external symbol XXX referenced in function _MAIN__
I have successfully tested when build the C++ source code as a static library and include the library into the Fortran project. However, I wish to debug the program into C++ code.
Could anyone tell me how to do? or give me a simple example project in which the Fortran code call C++ code?
Thanks,
Zhanghong Tang
0 Kudos
2 Replies
Steven_L_Intel1
Employee
451 Views
In VS.NET, Fortran and C code has to be in separate projects. But debugging should not be a problem - just make sure that the C++ code is built with the debug options and you should be able to step into or set breakpoints in the C++ code.
0 Kudos
Zhanghong_T_
Novice
451 Views
Hi Steve,
Thank you very much! I have also noticed this.
Thanks,
Zhanghong Tang
0 Kudos
Reply