Re: [netcdfgroup] [netcdf-porting] CMake integration with NetCDF

Good morning Joaquim,

Thank you for letting me know about this issue, as it is not one that manifests in my development environment (Windows 7, Visual Studio 2010). After spending some time with this, it looks like this issue may be caused by one of a couple different things:

1) Mixing debug and release libraries in Visual Studio
2) Including/Excluding particular Microsoft libraries at link time.

I was able to duplicate this problem, and have made some changes to the CMakeLists.txt files in the developer snapshot that appear to fix at least the second cause of these errors. Thanks again for letting me know; my development focus is fairly narrow, and these sorts of reports are very useful for finding broader errors.

Have a good afternoon,

-Ward

On 10/23/12 1:08 PM, J Luis wrote:
Hi,

I decided to give it a try today on Windows, but unfortunately I get
lots of linking errors like

Note that I am able to build netcdf4.2.1.1 with the cmake solution
that I pointed out once to this list (from GMT5).

best regards

Joaquim


[ 22%] Building C object libsrc4/CMakeFiles/netcdf4.dir/nc4internal.c.obj
nc4internal.c
[ 23%] Building C object libsrc4/CMakeFiles/netcdf4.dir/nc4hdf.c.obj
nc4hdf.c
[ 23%] Built target netcdf4
Scanning dependencies of target netcdf
[ 24%] Building C object liblib/CMakeFiles/netcdf.dir/stub.c.obj
stub.c
Linking C shared library netcdf.dll
    Creating library netcdf.lib and object netcdf.exp
nc4internal.c.obj : error LNK2001: unresolved external symbol __imp__free
nc4hdf.c.obj : error LNK2001: unresolved external symbol __imp__free
nc4file.c.obj : error LNK2001: unresolved external symbol __imp__free
nc4grp.c.obj : error LNK2019: unresolved external symbol __imp__free
referenced in function _NC4_def_grp
nc4type.c.obj : error LNK2001: unresolved external symbol __imp__free



On Tue, Oct 2, 2012 at 5:16 PM, Ward Fisher<wfisher@xxxxxxxxxxxxxxxx>  wrote:
Good morning,

We are happy to announce our initial integration of the CMake build system
with the NetCDF-C.
libraries. With CMake, we are able to provide support for a wider range of
platforms and build systems,
including Windows-native builds on systems with Visual Studio installed.
This initial integration is
built on Windows 7 and Visual Studio 2010.

The CMake-integrated source code is not yet part of an official release, but
it may be
checked out from our public subversion repository:

svn checkouthttp://svn.unidata.ucar.edu/repos/netcdf/trunk  netcdf

CMake 2.8.8+ is required. CMake may be downloaded fromhttp://www.cmake.org.
Instructions
for building NetCDF-C with CMake are described in the 'COMPILE_CMAKE.txt'
file found in
the root NetCDF-C directory, or at

http://www.unidata.ucar.edu/software/netcdf/CompileCMake.html.

I'm certain this file will evolve over time to answer questions which
come up.   I look forward to answering any questions regarding building
NetCDF-C with the CMake tools.

Have a great day,

-Ward
Ward Fisher
wfisher@xxxxxxxx

_______________________________________________
netcdf-porting mailing list
netcdf-porting@xxxxxxxxxxxxxxxx
For list information, to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/





  • 2012 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: