NOTE: The netcdf-porting
mailing list is no longer active. The list archives are made available for historical reasons.
On 24-10-2012 20:59, Ward Fisher wrote:
Good morning Joaquim,
Thanks, and same for you (though it's evening here - 8ºW) And thanks for the fix. It worked nicely. But I'll take this opportunity to raise a couple more issues.I see that you have maintained the ...../cmake/ConfigUser.cmake file but that it is ignored in CMakeList.txt I find that config file very handy, well more than handy, because it allowed me to provide the necessary settings such that cmake finds my HDF5 installation. Without it, the 'cmake find' found the HDF5 root installation but failed in the exact path (was pointing into a .../build64 directory that I don't have).
Another thing that I really want to recreate with your cmake files is the possibility to create the netcdf.dll under a different name. The reason is that, having been bitten so many times by the DLL hell I now build all my dlls with the suffix '_w32' or '_w64' as, for instance,
netcdf_w32.dll or netcdf_w64.dll in our original GMT cmake files I can do that by adding aset_target_properties (netcdf PROPERTIES RUNTIME_OUTPUT_NAME ${NETCDF_DLL_RENAME})
but since there is no 'netcdf' in CMakeList.txt, the above solution doesn't work anymore.
Do you have any advise on how I can do that? Have a good evening (latter on for you) 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.objnc4internal.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.expnc4internal.c.obj : error LNK2001: unresolved external symbol __imp__freenc4hdf.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__freeOn 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 systemwith the NetCDF-C.libraries. With CMake, we are able to provide support for a wider range ofplatforms 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, butit may be checked out from our public subversion repository: svn checkouthttp://svn.unidata.ucar.edu/repos/netcdf/trunk netcdfCMake 2.8.8+ is required. CMake may be downloaded fromhttp://www.cmake.org.Instructionsfor 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/
netcdf-porting
archives: