gpt4 book ai didi

c++ - NetCDF Visual Studio 2013

转载 作者:塔克拉玛干 更新时间:2023-11-03 07:14:11 24 4
gpt4 key购买 nike

我正在尝试使用 netCDF4.4.0-NC4-64.exe,我正在 Visual Studio 2013 Debug模式下开发 C++ MFC 应用程序。
我完全喜欢下面的答案:
Visual Studio - adding netCDF library

我正在尝试运行简单的代码:

#include <netcdf.h>
...
void MyMethod()
{
const char *ver = nc_inq_libvers();
}

但是当我尝试在 Release(32 位)上编译应用程序时,我得到:

error LNK2001: unresolved external symbol _nc_inq_libvers

调试模式下:

error LNK2019: unresolved external symbol _nc_inq_libvers referenced in function...

在 64 位发布/调试上:

error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

有什么问题吗?
谢谢

最佳答案

您正在混合使用 32 位和 64 位文件版本。尝试安装netcdf 3netCDF4.4.0-NC4-64.exe,

关于c++ - NetCDF Visual Studio 2013,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36113660/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com