views:

160

answers:

2

I used gcc to compile a few fortran source files into *.lib and *.dll on Windows platform, using the latest version of mingw . The gcc used is version 3. The result of the output is arpack_win32.dll, blas_win32.dll and lapack_win32.dll.

I then want to compile sssimp.f against the arpack_win32.dll, blas_win32.dll and lapack_win32.dll using Intel visual fortran compiler for Windows, because sssimp.f uses those dlls. But I got the impression ( from Intel support forum) that this is not possible.

Is my impression correct? Or is it that as long as I can produce the underlying libs and dlls ( no matter in which compiler and how old it is), I can use them as my base libs and dlls, and I can link to them from any, modern or old, compiler?

+1  A: 

g77 uses a different ABI than IVF, yes. So unless IVF has some g77/f2c compatibility option it's not going to work.

The easiest solution for you is probably to use IVF to compile the libraries too.

janneb
@janneb, I afraid that the arpack code, written in f77 has some IVF incompatible language constructs in it..
Ngu Soon Hui
Be as it may, combining code with incompatible calling conventions is just not going to work.
janneb
A: 

As already pointed out, mixing compilers with different calling conventions is likely to be very difficult.

That answer on the Intel Forum pointed out a version of arpack translated to Fortran 90 -- http://people.sc.fsu.edu/~burkardt/f_src/arpack/arpack.html -- can you use that? Also see http://people.sc.fsu.edu/~burkardt/f_src/lapack/lapack.html and http://people.sc.fsu.edu/~burkardt/f_src/blas1_s/blas1_s.html

Or Intel Visual Fortran should be able to compile Fortran 77 using suitable compiler options. What language constructs is it rejecting?

M. S. B.
Not sure about the translated f90 version--- the author himself clarified that the fortran 90 version might be sketchy, incomplete or downright wrong (http://people.sc.fsu.edu/~burkardt/f_src/f_src.html). As far as I can see, only one or two routines in the whole ARPACK package are translated.
Ngu Soon Hui
I read that as "use is your responsibility / risk" -- still worth a try to see if it works for your compiler and produces correct answers for a test case.
M. S. B.