I want to use netCDF formats in a C project using Visual Studio Express 2013 on a Windows 64bit. I've downloaded the installation file from the official website and executed the .exe.
Then, I've looked into this post to see how I should do the linking etc. More specifically, in my project in Visual Studio, I did the following:
- Put
#include < netcdf.h >
- in VC++ Directories, Library directories, I added C:\Program Files (x86)\netCDF 4.3.3.1\lib; C:\Program Files (x86)\netCDF 4.3.3.1\bin;
- in VC++ Directories, Include directories, I added C:\Program Files (x86)\netCDF 4.3.3.1\include; C:\Program Files (x86)\netCDF 4.3.3.1\bin;
- in the linker>input>Additional Dependencies, I added netcdf.lib (and all other .lib files I found in the \lib folder of netCDF 4.3.3.1
- Placed all .dll files of the \bin folder of netCDF 4.3.3.1 in Windows\System32 and Windows\SysWOW64
However, when I run the project (F5), it gives the following 2 errors:
- error LNK2019: unresolved external symbol_nc_strerror referenced in function _main
- error LNK1120: 1 unresolved external --> which is, I assume, due to the first error.
I'm a almost completely new to C programming and Visual Studio. Could somebody help?
Thanks in advance!