This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: [gcc] Link to a library
- From: Ian Lance Taylor <iant at google dot com>
- To: Vincenzo Urso Miano <ursomiano at googlemail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 07 Apr 2010 07:30:32 -0700
- Subject: Re: [gcc] Link to a library
- References: <95bdd9f61003272012g6376e161u87758932ec734abd@mail.gmail.com>
Vincenzo Urso Miano <ursomiano@googlemail.com> writes:
> 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
This is the linker saying that it could not find a file named "\".
You need to type the whole compilation command on one line, or you
need to put it in a file and use @FILE.
Ian