[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Steven Matheson: Re: 950207: tbl2cdf



> Organization: Dept. of Oceanography, Dalhousie University
> Keywords: 199502071946.AA10756

On Tue, 7 Feb 1995, Russ Rew wrote:

> > Organization: Dept. of Oceanography, Dalhousie University
> > Keywords: 199502071946.AA10756
> 
> I think this may just be the order of arguments to gcc.  Try the following
> instead:
> 
>   gcc -ansi -o tbl2cdf -I/opt/netcdf/include tbl2cdf.c -L/opt/netcdf/lib 
> -lnetcdf
> 
> If that doesn't work, I'm stumped.

It works!  I'm amazed that gcc is so sensitive to argument placement.  
Although, it does make sense that the final arguments are just passed to 
the linker.

Also, in testing nctst.cc, I found this exact ordering was needed:

g++ -o nctst -I/opt/netcdf/include nctst.cc -L/opt/netcdf/lib -lnetcdf_c++ 
-lnetcdf

Even if the order of the final two arguments is reversed it won't link!

Thanks (again) for your help!

________________________________________________________________________
Steven Matheson                  E-mail: address@hidden
Dept. of Oceanography            Phone: (902) 494-6663
Dalhousie University             FAX: (902) 494-2885
Halifax, NS CANADA, B3H 4J1      http://www.phys.ocean.dal.ca/~matheson/