[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #RKJ-114360]: netcdf will not link properly
- Subject: [netCDF #RKJ-114360]: netcdf will not link properly
- Date: Fri, 28 Jan 2011 13:26:17 -0700
> Hi,
>
> I am trying to include netdcf in a model, written in c++ on a Mac (OS 10.5)
>
> The following code in my main.cpp:
>
> NcFile Nc(&NcFilename[0], NcFile::Replace, NULL, 0, NcFile::Classic);
>
> gives linker errors:
> "NcFile::NcFile(char const*, NcFile::FileMode, unsigned long*,
> unsigned long, NcFile::FileFormat)", referenced from:
> _main in main.o
> ld: symbol(s) not found
>
> When I installed netcdf 4.1.1 from source all configuration,
> installation and testing went smootly
> the includes are put in /opt/local/include, netcdfcpp.h is included in
> main.cpp by #include <netcdfcpp.h>
> I'm using Xcode as a programming interface
>
> Can anyone give me a clue how to solve this?
>
> Best regards
> Ko van Huissteden
>
>
Howdy Ko!
I suggest you use the C API instead of the C++ API. The C++ API is outdated,
and we are working on a replacement, but it is not ready yet.
However, if you still want to use it, go into the cxx directory in the netCDF
install, and run "make check" to run the C++ API tests.
Thanks,
Ed
Ticket Details
===================
Ticket ID: RKJ-114360
Department: Support netCDF
Priority: Normal
Status: Closed