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

C and Fortran Object code in the same static library

elm0166
Beginner
230 Views
Good afternoon,

I just installed Intel fortran 7.0 in my visual.net environment. I am trying to create a static library project which would contain C source code (Microsoft tools) and Fortran from Intel.
I created the library using the intel fortran wizard, but after having added the source code to the project, it seems that only the fortran is compiled. What am I doing wrong? Do I need to create 2 separate libraries, one for the C code and one for the fortran. Note that the fortran is fortran 77 compiled with openMP.

Thanks for any feedback

Eric
0 Kudos
1 Reply
Steven_L_Intel1
Employee
230 Views
Yes, unfortunately, you do. Microsoft erected this wall between different languages in the VS.NET environment so that a C project knows only about C sources, a Fortran project knows only about Fortran sources, etc. This is indeed very annoying when building a mixed-language static library.

One possible solution is to add a post-build step to one of the projects that issues a lib command to insert the objects from the other project into the main library. Not pretty, I know.

Steve
0 Kudos
Reply