|
Prev: Announcement: (partial) F90 Interface to POSIX for gnu Fortran
Next: automatic arrays with negative size in g95 and gfortran
From: Bart Vandewoestyne on 8 Jun 2006 05:45 When compiling my code with gfortran and its -c switch, i always get the following kind of messages: gfortran: -rpath=<path_to_gfortran_root>/gfortran/current/lib: linker input file unused because linking not done I have the impression that this is simply an informational message and that it doesn't do much harm, but I was wondering what exactly caused it and how I can avoid this message in a clean way. Any suggestions? Bart -- "Share what you know. Learn what you don't."
From: Tim Prince on 8 Jun 2006 08:37 Bart Vandewoestyne wrote: > When compiling my code with gfortran and its -c switch, i always get the > following kind of messages: > > gfortran: -rpath=<path_to_gfortran_root>/gfortran/current/lib: linker > input file unused because linking not done > > I have the impression that this is simply an informational > message and that it doesn't do much harm, but I was wondering > what exactly caused it and how I can avoid this message in a > clean way. If you want to avoid the message, don't incorporate any (unneeded) compiled objects or libraries in the gfortran -c command. The main use of the warning is for those of us who forget to remove -c and would like to know why gfortran did not start the linker.
From: Bart Vandewoestyne on 8 Jun 2006 09:46 On 2006-06-08, Tim Prince <timothyprince(a)sbcglobal.net> wrote: > > If you want to avoid the message, don't incorporate any (unneeded) > compiled objects or libraries in the gfortran -c command. I'm not quite sure if I understand what you mean... consider the following hello world: program hello_world print *, "Hello world" end program hello_world which i compile with: $ gfortran -c hello_world.f95 gfortran: -rpath=/cw/fortran/bin/../gfortran/current/lib: linker input file unused because linking not done Then for as far as I know I am not incorporating any (unneeded) objects or libraries in the gfortran -c command but still I get the warning message. Without the -c option, i don't get the warning (which is how I expect it to be) but i'm still a bit confused why I also get the warning with the -c option. If i understand you correctly, then you say that the warning is given to remind the user to the fact that linking is not done... but if a user specifies the -c option, he explicitly tells the compiler not to link so I guess the user then *knows* he is not linking and shouldn't be warned about that? Or am I misunderstanding/misinterpreting things here? Bart -- "Share what you know. Learn what you don't."
From: FX on 8 Jun 2006 10:08 > $ gfortran -c hello_world.f95 > gfortran: -rpath=/cw/fortran/bin/../gfortran/current/lib: linker input file unused because linking not done Hum. Where do you get you gfortran from? Is it home-compiled (with which "configure" command-line) or is it a binary package? -- FX
From: Tim Prince on 8 Jun 2006 10:08
Bart Vandewoestyne wrote: > Without the -c option, i don't get the warning (which is how I expect it to be) > but i'm still a bit confused why I also get the warning with the -c option. > > If i understand you correctly, then you say that the warning is given to remind > the user to the fact that linking is not done... but if a user specifies > the -c option, he explicitly tells the compiler not to link so I guess the user > then *knows* he is not linking and shouldn't be warned about that? Or am I > misunderstanding/misinterpreting things here? > That's my understanding. If you use the -c option with objects which could be used only when linking, you get the warning to remind you that you didn't request link. |