- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
Thank you very much! I have also noticed this.
Thanks,
Zhanghong Tang
Zhanghong Tang

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page