public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* [gcc] Link to a library
@ 2010-03-29  5:07 Vincenzo Urso Miano
  2010-04-07 14:30 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Vincenzo Urso Miano @ 2010-03-29  5:07 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gcc] Link to a library
  2010-03-29  5:07 [gcc] Link to a library Vincenzo Urso Miano
@ 2010-04-07 14:30 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2010-04-07 14:30 UTC (permalink / raw)
  To: Vincenzo Urso Miano; +Cc: gcc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-07 14:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-29  5:07 [gcc] Link to a library Vincenzo Urso Miano
2010-04-07 14:30 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).