Connecting VC 2005 with Intel Fortran

Steve Lionel (Intel)
Total Points:
115,145
Status Points:
115,145
Black Belt
December 5, 2008 5:47 AM PST
Rate
 
|Best Answer
#3 Reply to #2

Sorry, I did not understand the question.  You want to build a mixed C and Fortran application.

  • First, please download and install Service Pack 1 for Visual Studio 2005.  This resolves a Microsoft bug relating to dependent projects.
  • The C code will need to be in a C++ Static Library project in your solution.  Once you have that, right click on the Fortran project and select the C project to be a dependent of the Fortran project
  • Make sure that the run-time library types match between C and Fortran.  In the C project, the property is under Code Generation, in Fortran, Libraries
  • I note that the Fortran program is looking for _c_fun.  That suggests to me that you compiled with the /names:lowercase option.  I don't recommend that - a better choice is to use !DEC$ ATTRIBUTES ALIAS to rename C_FUN or spell the C routine in upper case.

That should do it.  Since you are using an old version (11.0 is current), you don't have available the samples that were added in 10.0.  Those include mixed-language projects.




Intel Software Network Forums Statistics

8479 users have contributed to 31611 threads and 100667 posts to date.
In the past 24 hours, we have 31 new thread(s) 108 new posts(s), and 167 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member zhpn