- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a C++ program which calls some 'C' functions and calls some Fortran 77 functions pre-defined in a library indirectly.
I can compile the C++ program to generate an object code using icc (Intel compiler 7.1)
But when I use ifc (Intel compiler 7.1) to link the object codes together to create an executable,ifccomplains that it cannot findsome standard'C++' functions (e.g. std::cout)and fails.
Any idea of how to overcome this problem?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you use ifc to link a combination of C++ (icc) and Fortran, you will need to append -lcprts (IIRC, for that old compiler with Dinkumware STL). You could poke around with nm in the library directory of you icc installation to find out which .a libraries are required to satisfy missing references. If your C++ were built with -cxxlib_gcc, you would use -lstdc++ instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe it doesn't go without saying, you must somehow avoid conflicts between Fortran and C++ runtime, preferably avoiding any mixing of I/O streams, for example.
![](/skins/images/BC9A7A3465121B56B278007F4EE8899F/responsive_peak/images/icon_anonymous_message.png)
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