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

[netCDF #KXZ-269891]: Linker error using sample program

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: [netCDF #KXZ-269891]: Linker error using sample program
  • Date: Tue, 24 Jun 2008 06:52:15 -0600

> Full Name: zhengpeng li
> Email Address: address@hidden
> Organization: ARTS
> Package Version: 4.0
> Operating System: Windows XP
> Hardware:
> Description of problem:
>
> I tried to compile the simple_xy_rd.cpp using binary netcdf package under
DEV-C++ interface, gnu C++ compiler.  But got following error:
>
> [Linker error] undefined reference to `NcFile::NcFile(char const*,
NcFile::FileMode, unsigned int*, unsigned int, NcFile::FileFormat)'
>
> [Linker error] undefined reference to `NcFile::is_valid() const'
>
> I already included the libnetcdf_c++.a as library
>
>

When you build netcdf, did you run "make check?"

If so, the example were already built and run. Go to the example directory and
type "make clean check" to see how they are being built on your machine.

Good luck,

Ed

Ticket Details
===================
Ticket ID: KXZ-269891
Department: Support netCDF
Priority: Normal
Status: Closed