[gcc] Link to a library
Vincenzo Urso Miano
ursomiano@googlemail.com
Mon Mar 29 05:07:00 GMT 2010
Hello,
I simply need to link a fortran source to a library: plplot.
This is how i did it.
_____________________________________________
gcc -o x01f.exe x01f.f \
"C:\Program Files\plplot\bin\libplplotf77d.dll.a" \
"C:\Program Files\plplot\bin\libplplotf77cd.dll.a" \
"C:\Program Files\plplot\bin\libplplotd.dll.a"
________________________________________________
and here's the result:
_____________________________________________________
E:\Workspace\temp\plplot>gcc -o x01f.exe x01f.f \
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: \: No such
file: No such file or directory
collect2: ld returned 1 exit status
E:\Workspace\temp\plplot>"C:\Program Files\plplot\bin\libplplotf77d.dll.a" \
'"C:\Program Files\plplot\bin\libplplotf77d.dll.a"' is not recognized as an inte
rnal or external command,
operable program or batch file.
E:\Workspace\temp\plplot>"C:\Program Files\plplot\bin\libplplotf77cd.dll.a" \
'"C:\Program Files\plplot\bin\libplplotf77cd.dll.a"' is not recognized as an int
ernal or external command,
operable program or batch file.
E:\Workspace\temp\plplot>"C:\Program Files\plplot\bin\libplplotd.dll.a"
'"C:\Program Files\plplot\bin\libplplotd.dll.a"' is not recognized as an interna
l or external command,
operable program or batch file.
___________________________________________________________
It looks like it does not find ld.exe I've got it in my c:\MinGW\Bin.
Should I specify that path?
Could you help me building this source?
Thanks
Vince
More information about the Gcc-help
mailing list