From: Ed <ej...@id...> - 2006-12-04 17:07:12
|
Earnie Boyd <ea...@us...> writes: > Quoting Ed <ej...@id...>: > > > "Roger K. Wells" <ROG...@sa...> writes: > > > >> FWIW > >> > >> I use netCDF in conjunction with GMT. For several years I have built > >> "libnetcdf.dll" (now at version 3.6.0) using MinGW. > >> Let me know if anything I might have (build script, binary, etc) might > >> help and I will send it along. > >> > > > > Roger, > > > > I can now produce the C DLL under MinGW, but I have to fire up the > > Visual Studio DOS shell to run the lib command to create the .lib > > file. > > > > Have you tried ``cp libnetcdf.a netcdf.lib''? Do note that > gcc/binutils searches for libnetcdf.dll, libnetcdf.dll.a, libnetcdf.a > and netcdf.lib in its searches for the library. You amaze me! Yet the gcc manual does not mention this. Is it a special MinGW thing? The gcc manual says: The linker searches a standard list of directories for the library, which is actually a file named `libLIBRARY.a'. The linker then uses this file as if it had been specified precisely by name. and later: The only difference between using an `-l' option and specifying a file name is that `-l' surrounds LIBRARY with `lib' and `.a' and searches several directories. No mention of trying without the "lib"! > > > Have you ever succeeded in running this lib.exe command from the MSYS > > environment? If so, I can have the makefile do this part too. > > > > I've not tried it. Switches in the form of /a need to be doubly slashed //a. > Thanks for that tip, I was thinking there was going to be some trouble about the slashes that DOS uses to pass options to commands! Thanks, Ed |