Hi, I'm new to g95 and Fortran. I'm having a few problems linking. I
wrote a small test program to test linking to precompiled lapack blas
libraries I downloaded from the SciPy website:
I followed instructions from this thread:
http://groups.google.as/group/gg95/browse_thread/thread/62f346a53e9c3b37/1000c405829a76de?lnk=gst&q=atlas+lapack#1000c405829a76de
The libraries I found here:
http://www.scipy.org/Installing_SciPy/Windows#head-cd37d819e333227e327079e4c2a2298daf625624
The following is my test code:
program testblas
external DGEMM
integer, parameter :: rd = SELECTED_REAL_KIND(15,307)
real(kind=rd),dimension(2,2) :: a,b,c
c=0.0
a(1,1)=1.1
a(1,2)=1.3
a(2,1)=1.7
a(2,2)=1.5
b(1,1)=1.6
b(1,2)=1.7
b(2,1)=1.8
b(2,2)=1.3
call DGEMM ( 'n','n', 2, 2, 2, 1.0_rd, a, 2, b, 2, 0.0_rd, c, 2 )
print*, c
end program testblas
I then compile and link with the following commands:
D:\Fortran\testblas>g95 -o testblas.exe testblas.f95 -llapack -
lf77blas -lcblas -latlas -lg2c
However I get the following error message:
D:\Fortran\testblas>g95 -o testblas.exe testblas.f95 -llapack -
lf77blas -lcblas
-latlas -lg2c
c:/programme/g95/bin/../lib/gcc-lib/i686-pc-mingw32/4.0.4//libg2c.a
(main.o):(.te
xt+0x38): undefined reference to `_MAIN__'
The libraries are in the lib directory of my g95 installation. the
paths are set.
I'm using i686-pc-mingw32 4.0.4
Any ideas anyone?
Best regards
Albert