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

dynamic link library compilation questions

chaoticerrantry
Beginner
235 Views
How do I mix C and fortran code, and still compile the outfile into a dynamic link library?
MSDN site gives the example
cl /c cmain.c
fl32 cmain.obj forsubs.for
to get an exe, but I am not aware of most fortran compilers ability to create dll's (I am using the gnu fortran 77 compiler, but also have access to Compaq fortran compiler, my OS is windows). However, when I try to use cl to compile, there are multiple unresolved references, because cl did not load the fortran libraries. Which libraries am I suppose to load and how do I load them? Is there options for fortran to compile into dlls? I would appreciate some command line recipes.
I have work on this for the past week, and I am stuck on this issue. I would appreciate any help.
0 Kudos
1 Reply
TimP
Honored Contributor III
235 Views
If you want to do this with g77, you should find it easier to mix gcc with g77, and follow the advice in the cygwin and g77 documentation. There are enough differences from Intel compilers to make this off topic here. Depending on the content of your questions, the gcc-help or cygwin mailing lists might be appropriate.
For CVF, you should find advice in the Visual Studio help.
0 Kudos
Reply