mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3594
This commit is contained in:
parent
e935497427
commit
2ff9fc31d8
|
@ -1,9 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
require_once("docutil.php");
|
require_once("docutil.php");
|
||||||
page_head("FORTRAN applications");
|
page_head("FORTRAN applications");?>
|
||||||
echo "
|
|
||||||
<h2>How to use BOINC with FORTRAN and Visual Developer Studio</h2>
|
<h2>How to use BOINC with FORTRAN and Visual Developer Studio</h2>
|
||||||
|
|
||||||
|
<p><font color=red>2004-06-16 note: this page is outdated (functions are now
|
||||||
|
declared <code>extern"C"</code> so no C++ mangling is done</font></p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Note: a working example similar to the following
|
Note: a working example similar to the following
|
||||||
(based on outdated BOINC code) is
|
(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 and subroutine:
|
||||||
<pre>
|
<pre>
|
||||||
INTERFACE
|
INTERFACE
|
||||||
SUBROUTINE boinc_finish(status)
|
SUBROUTINE boinc_finish(status)
|
||||||
END SUBROUTINE boinc_finish
|
END SUBROUTINE boinc_finish
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
</pre>
|
</pre>
|
||||||
|
@ -39,7 +42,7 @@ You do this by adding the statement:
|
||||||
!DEC$ ATTRIBUTES C :: boinc_finish
|
!DEC$ ATTRIBUTES C :: boinc_finish
|
||||||
</pre>
|
</pre>
|
||||||
Because BOINC is compiled as C++ files
|
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,
|
the standard function name in the object file,
|
||||||
you therefore have to add an alias for
|
you therefore have to add an alias for
|
||||||
the function giving the real function name:
|
the function giving the real function name:
|
||||||
|
@ -64,7 +67,7 @@ INTERFACE
|
||||||
SUBROUTINE boinc_finish(status)
|
SUBROUTINE boinc_finish(status)
|
||||||
!DEC$ ATTRIBUTES C :: boinc_finish
|
!DEC$ ATTRIBUTES C :: boinc_finish
|
||||||
!DEC$ ATTRIBUTES ALIAS : '?boinc_finish@@YAHH@Z' :: boinc__finish
|
!DEC$ ATTRIBUTES ALIAS : '?boinc_finish@@YAHH@Z' :: boinc__finish
|
||||||
INTEGER status
|
INTEGER status
|
||||||
END SUBROUTINE boinc_finish
|
END SUBROUTINE boinc_finish
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
@ -73,7 +76,8 @@ You can now call the BOINC function in FORTRAN.
|
||||||
<pre>
|
<pre>
|
||||||
call boinc_finish(0)
|
call boinc_finish(0)
|
||||||
</pre>
|
</pre>
|
||||||
";
|
|
||||||
|
<?php
|
||||||
page_tail();
|
page_tail();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue