Connecting VC 2005 with Intel Fortran

Steve Lionel (Intel)
Total Points:
112,121
Status Points:
112,121
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

8290 users have contributed to 31237 threads and 99111 posts to date.
In the past 24 hours, we have 8 new thread(s) 18 new posts(s), and 24 new user(s).

In the past 3 days, the most popular thread for everyone has been comparison cilk++, openmp, pthreads first results The most posts were made to comparison cilk++, openmp, pthreads first results The post with the most views is Very amusing...  Escalated as

Please welcome our newest member zq.x