From 2ff9fc31d84062b150c8890f2456da682fa02e3c Mon Sep 17 00:00:00 2001 From: Karl Chen Date: Wed, 16 Jun 2004 09:43:15 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=3594 --- doc/fortran.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/fortran.php b/doc/fortran.php index 552fa72a41..98d95b69cf 100644 --- a/doc/fortran.php +++ b/doc/fortran.php @@ -1,9 +1,12 @@ +

How to use BOINC with FORTRAN and Visual Developer Studio

+

2004-06-16 note: this page is outdated (functions are now +declared extern"C" so no C++ mangling is done

+

Note: a working example similar to the following (based on outdated BOINC code) is @@ -22,7 +25,7 @@ For every BOINC function you want to call from fortran you must add an interface and subroutine:

 INTERFACE
-  SUBROUTINE boinc_finish(status)	
+  SUBROUTINE boinc_finish(status)
   END SUBROUTINE boinc_finish
 END INTERFACE
 
@@ -39,7 +42,7 @@ You do this by adding the statement: !DEC$ ATTRIBUTES C :: boinc_finish Because BOINC is compiled as C++ files -the FORTRAN compiler will not be able to find +the FORTRAN compiler will not be able to find the standard function name in the object file, you therefore have to add an alias for the function giving the real function name: @@ -64,7 +67,7 @@ INTERFACE SUBROUTINE boinc_finish(status) !DEC$ ATTRIBUTES C :: boinc_finish !DEC$ ATTRIBUTES ALIAS : '?boinc_finish@@YAHH@Z' :: boinc__finish - INTEGER status + INTEGER status END SUBROUTINE boinc_finish END INTERFACE @@ -73,7 +76,8 @@ You can now call the BOINC function in FORTRAN.
 call boinc_finish(0)
 
-"; + +