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

Debugging C++ "bound" into Fortran

PeterTheRascal
Beginner
411 Views
  • VS Community Edition 2015
  • Intel® Parallel Studio XE 2017 Update 2 Composer Edition for Fortran Windows*   Package ID: w_comp_lib_2017.2.187

I have integrated C++ into my Fortran using Bind. The C++ is in an object library in different solution and project,

I start debugging using Attach to process (to either Mathematica Net/link of Excel but cannot step into the C++

How can I properly debug the C++ code?

 

 

 

 

 

0 Kudos
1 Solution
jimdempseyatthecove
Honored Contributor III
411 Views

It would appear that your C++ library was built without debug information. This requires both the compiler to generate object files containing debug information, and a Link/Librarian command to not strip out debug information. This may also require you to not move the library from where it was built. The VS debugger can pop-up a symbols locator in the event the library is moved, but sometimes this does not happen when you expect it to.

Is this a static or dynamic library?
Is the entry point a Fortran Program or a C/C++ main()?

Jim Dempsey

View solution in original post

0 Kudos
2 Replies
jimdempseyatthecove
Honored Contributor III
412 Views

It would appear that your C++ library was built without debug information. This requires both the compiler to generate object files containing debug information, and a Link/Librarian command to not strip out debug information. This may also require you to not move the library from where it was built. The VS debugger can pop-up a symbols locator in the event the library is moved, but sometimes this does not happen when you expect it to.

Is this a static or dynamic library?
Is the entry point a Fortran Program or a C/C++ main()?

Jim Dempsey

0 Kudos
FortranFan
Honored Contributor II
411 Views

Also, see this thread, particularly Message #5 and #6.  Are you, by any chance, using managed C++?  If yes, then it poses a limitation in the current VS environment with Intel Fortran integration.

https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/710188

 

0 Kudos
Reply