Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting ld options through gfortran 1

Status
Not open for further replies.

NickFort

Technical User
Jun 10, 2010
113
I want to set the option --enable-auto-import for ld, just to get ld to shut up with its "info"; it typically says: "warning: auto-importing has been activated without --enable-auto-import specified on the command line". It's this warning that I want to suppress.

However, gfortran automatically calls ld; how would I specify command line options for ld through gfortran? I've tried compiling with the option --enable-auto-import, but gfortran gave me "unrecognized command line option". If I include --enable-auto-import along with the -shared option (which is the context in which --enable-auto-import is used), it doesn't complain, but it still gives me the above warning.

Thoughts?

--------------------------------------
Background: Chemical engineer, familiar mostly with MATLAB, but now branching out into real programming.
 
Since gfortran is gcc based, you could try preceding it by -Xlinker. On gcc, -Xlinker is used to pass options to the linker.
 
xwb -- you are a legend! :) It worked like a charm; thanks!

--------------------------------------
Background: Chemical engineer, familiar mostly with MATLAB, but now branching out into real programming.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top