Does anyone know how to set up the lib f2c (a Fortran to C/C++ converter) to
work with Dev-Cpp in Windows? In Ubuntu I can simply install the .DEB file and
link to it during compilation. After converting my Fortran Code, it attaches
the following to the beginning of the code, it may be helpful in understanding
what I am talking about:
/* ising.f -- translated by f2c (version 20050501). You must link the resulting object file with libf2c: on Microsoft Windows system, link with libf2c.lib; on Linux or Unix systems, link with .../path/to/libf2c.a -lm or, if you install libf2c.a in a standard place, with -lf2c -lm -- in that order, at the end of the command line, as in cc *.o -lf2c -lm Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., [url]http://www.netlib.org/f2c/libf2c.zip[/url]*/#ifdef __cplusplusextern"C"{#endif#include"f2c.h"
Thank you very much for your help!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Note:
I googled the file libf2c.lib and found a copy from a couple of sources
including: http://icl.cs.utk.edu/lapack-for-
windows/clapack/index.html#libraries
, but Dev-Cpp didn't find them. I tried renaming the libf2c.lib to libf2c.a
but the following compilation errors occured:
Therein perhaps lies the clue to your problem. MinGW/GCC links to the VC++ 6.0
C Runtime (CRT), this warning refers to the VC++2010 C runtime. I suggest that
the easiest solution is probably to use the compiler for which the library was
intended!
Does anyone know how to set up the lib f2c (a Fortran to C/C++ converter) to
work with Dev-Cpp in Windows? In Ubuntu I can simply install the .DEB file and
link to it during compilation. After converting my Fortran Code, it attaches
the following to the beginning of the code, it may be helpful in understanding
what I am talking about:
Thank you very much for your help!!
Note:
I googled the file libf2c.lib and found a copy from a couple of sources
including: http://icl.cs.utk.edu/lapack-for-
windows/clapack/index.html#libraries
, but Dev-Cpp didn't find them. I tried renaming the libf2c.lib to libf2c.a
but the following compilation errors occured:
I am using Windows Vista Home Premium because that is what the computer was
bought with.
also tried this one: http://www.physics.ohio-
state.edu/~ntg/780/setting_up_on_windows.php
specifically: http://www.physics.ohio-
state.edu/~ntg/780/downloads/CLAw32.zip
Therein perhaps lies the clue to your problem. MinGW/GCC links to the VC++ 6.0
C Runtime (CRT), this warning refers to the VC++2010 C runtime. I suggest that
the easiest solution is probably to use the compiler for which the library was
intended!
http://www.microsoft.com/express/downloads/
Thanks iamactuallyabot , very nice infomation you shared here.
Marks