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

Does LIB command's OMF to COFF conversion really work?

randystonesifer
Beginner
734 Views

I have created a library composed from .obj files created by CVF6 and Borland C++5.5. The Windows LIB command was used to add the c++ files to a .lib file and it gave the message that OMF files were being converted to COFF. LIB/LIST shows the obj files were included. DUMPBIN/SYMBOL of the .lib file shows the symbols of the c++ objects. A CVF6 fortran program that tries to use the library is, however, not able to resolve references tothe c++ symbols.

Any ideas for understanding/fixing the problem would be appreciated.

I am porting the combined fortran and c code from a unix system. I am using Borland's compiler because it was a free download.
Thanks,
Randy
0 Kudos
1 Reply
Lorri_M_Intel
Employee
734 Views
The problem is less likely to be the OMF->COFF conversion than a simple naming problem.
Moreover, there are other things to worry about with mixed language programming than simply the external names, including how arguments are passed, and who cleans up the stack.
If you haven't already, I'd suggest looking at the chapter on Programming with Mixed Languages in the online Programmer's guide. There's a ton of information there that should be useful here.
Then, once you think it's all set, you can use dumpbin -symbols on both the Fortran objects and the C++ libraries to make sure the names actually match.
Good luck!
- Lorri
0 Kudos
Reply