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

[netCDF #VPI-824813]: linking failing for netcdf-cxx4.lib for c++ lib



Hello Suresh,

I am not certain why it would have compiled the shared library, but would have 
failed to build the import library, netcdf-cxx4.lib.  You might try building 
the library statically, e.g. pass '-DBUILD_SHARED_LIBS=OFF' to cmake, and then 
see if netcdf-cxx4.lib is generated when you build.  If so, you should be able 
to link against this library and not worry about a shared .dll.  If not, it 
indicates a larger issue.  I don't have access to VS2010, unfortunately, but I 
will see if I can recreate this issue in my Windows environment.

-Ward

> Hello,
> 
> 
> I have compiled C libraries for NetCDF4 and now I have downloaded
> netcdf-cxx4-4.3.0 and trying to build c++ lib for NetCDF4.
> 
> I am using Visual Studio 2010 to compile the library on Windows platform
> I am using CMake to generate the VC++ project files for VS2010.
> I have included the netcdf-c library and include path to the projects.
> Now when I try to compile the NCXX solution, it fails with the following
> linking error,
> 
> ===================== Error ==================
> 
> 18>CustomBuild:
> 18>  All outputs are up-to-date.
> 18>ClCompile:
> 18>  All outputs are up-to-date.
> 18>LINK : fatal error LNK1181: cannot open input file 
> 'Release\netcdf-cxx4.lib'
> 18>
> 18>Build FAILED.
> 18>
> 18>Time Elapsed 00:00:00.20
> 22>------ Skipped Build: Project: PACKAGE, Configuration: Release Win32 ------
> 22>Project not selected to build for this solution configuration
> 23>------ Skipped Build: Project: INSTALL, Configuration: Release Win32 ------
> 23>Project not selected to build for this solution configuration
> ========== Build: 0 succeeded, 15 failed, 3 up-to-date, 8 skipped ==========
> 
> +++++++++++++++++++++++++++++++++++++
> 
> However, I could see the netcdf-cxx4.dll compiled in the Release directory 
> but do not see netcdf-cxx4.lib generated.  
> 
> How do I get the netcdf-cxx4.lib built?
> 
> Appreciate any pointers to resolve the issue.
> 
> Thanks
> Suresh Panara
> 
> 
> 

Ticket Details
===================
Ticket ID: VPI-824813
Department: Support netCDF
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.