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

[netCDF #BZC-587829]: Bug report netcdf 4.3.2



Hello Phil,

Assuming that your libcurl was compiled statically, you will need to explicitly 
link against "ws2_32.lib" and "wldap32.lib".  We have a mechanism for this that 
will hopefully work for you. Try adding the following to your cmake command:

-DNC_EXTRA_DEPS="ws2_32 wldap32" 

You may also need to use "-DCMAKE_PREFIX_PATH" if the libraries are not on your 
system path.  

If this doesn't work, you should be able to open the resulting Visual Studio 
project file and add the libraries there.  To do this, you would load the 
ALL_BUILD Visual Studio project and then:

1. Right click 'netcdf' in the 'Solution Explorer' and select 'Properties'.
2. Under 'Configuration Properties' edit 'Librarian->Additional Dependencies'
3. Under 'Configuration Properties' edit 'Librarian->Additional Library 
Directories' if needed.

Note that these instructions are for Visual Studio 2010; I don't have access to 
a machine with Visual Studio 2011, but hopefully they are similar.  

Let me know if neither of these solutions work for you. 

I hope this helps,

-Ward

> Hi
> 
> I'm having some problems building NEtcdf 4.3.2 using your CMake system. I
> am building using MSVC++ on Windows 8.1. The problem is that for most
> of the tests, the correct libraries are not included in the build,
> giving link errors.
> 
> The missing libraries are ws2_32.lib and wldap32.lib. My build includes
> CURL and I assume these dependencies are inherited via curl. Note that
> I am building a static version of netcdf.
> 
> My CMAKE command is
> 
> D:\usr\local\src\netcdf-4.3.2\build\Visual Studio 11 64sd>cmake 
> "D:\usr\local\sr
> c\netcdf-4.3.2" -G "Visual Studio 11 Win64" 
> -DCMAKE_INSTALL_LIBDIR="D:\usr\local
> \lib64sd" -DCMAKE_INSTALL_PREFIX="D:\usr\local" 
> -DCMAKE_LIBRARY_PATH="D:\usr\loc
> al\lib64sd" -DBUILD_SHARED_LIBS=OFF -DCMAKE_CONFIGURATION_TYPES="Debug" 
> -DNC_USE
> _STATIC_CRT=ON -DCMAKE_PREFIX_PATH="D:\usr\local\lib64sd" 
> -DHDF5_LIB="D:\usr\loc
> al\lib64sd\libhdf5.lib" -DHDF5_HL_LIB="D:\usr\local\lib64sd\libhdf5_hl.lib" 
> -DHD
> F5_INCLUDE_DIR="CMAKE_INCLUDE_PATH" 
> -DCURL_LIBRARY="D:\usr\local\lib64sd\libcurl
> .lib" -DCURL_INCLUDE_DIR="CMAKE_INCLUDE_PATH" 
> -DSZIP_LIBRARY="D:\usr\local\lib64
> sd\szip.lib"
> 
> I have attached my CmakeCache.txt in case that is helpful.
> 
> Best Regards
> Phil
> 
> 


Ticket Details
===================
Ticket ID: BZC-587829
Department: Support netCDF
Priority: Normal
Status: Closed