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

linking to a C object in Visual Fortran using Visual Studio

mhovers
Beginner
367 Views

I have a fortran main program that calls a C routine. I have compiled the C routine using gcc and have a .o file. I cant figure out how to get the Build in Visual Studio to link the fortran and to c *.o files? Where do I tell it the name of the *.o and where it is?

thanks,

Mike Hoversten

0 Kudos
1 Reply
TimP
Honored Contributor III
367 Views
This would have to have been built by a gcc targeted for Windows, with no run time library dependency other than on the Windows libraries, such as mingw-gcc. In that case, you should be able to rename as .obj and add to the .obj files of your project. Normally, you would rebuild using the VS compiler for compatibility with ifort.
0 Kudos
Reply