Originally Posted by Kanangill
Thank you so much for the help. That solves my problem. Just curious, but does the order of the arguments make a difference?
Such as giving the include and link option and the name of the after both of those. A link I found on the internet says that the order of specification is important for 'some linkers'.
So which linkers? Thanks in advance (and with some hope)
Yes. I'd say the same: it is important for some linkers but I can't tell anything more either. I have encountered some problem using the proprietary Solaris fortran compiler (and linker) in the past, but I'm not sure about the exact issue.
Recently I encountered a problem compiling a fortran code against the grib_api libraries (grib is a file format specific for atmospheric model data). The order by which I specify the two libraries to link against is important, e.g.
pgf95 blah blah blah -L/lhome/swan/roms/grib_api-1.9.0/lib -lgrib_api_f90 -lgrib_api
pgf95 blah blah blah -L/lhome/swan/roms/grib_api-1.9.0/lib -lgrib_api -lgrib_api_f90
does not, most likely for the crossed references between the two libraries. Anyway, if I put the -I option, the code to compile and the -L option in this order is a habit for me. Trying to change this order is just something to remember in case of problems.