Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 解决;“导入本地定义的符号”;VC+中的错误+;2015_C++_Visual Studio_Wdk_Linker Errors - Fatal编程技术网

C++ 解决;“导入本地定义的符号”;VC+中的错误+;2015

C++ 解决;“导入本地定义的符号”;VC+中的错误+;2015,c++,visual-studio,wdk,linker-errors,C++,Visual Studio,Wdk,Linker Errors,我有一个使用Maxim的OneWire公共域API和WinUSB的小命令行程序。它使用Win7/VS2013在我的笔记本电脑上构建得非常好。现在,我正试图在我的新台式PC上将其移动到Win8.1/VS2015,但我无法构建它。以下是报告的错误: 1>------ Build started: Project: readtemp5, Configuration: Debug Win32 ------ 1>presshum.obj : warning LNK4217: locally d

我有一个使用Maxim的OneWire公共域API和WinUSB的小命令行程序。它使用Win7/VS2013在我的笔记本电脑上构建得非常好。现在,我正试图在我的新台式PC上将其移动到Win8.1/VS2015,但我无法构建它。以下是报告的错误:

1>------ Build started: Project: readtemp5, Configuration: Debug Win32 ------
1>presshum.obj : warning LNK4217: locally defined symbol _printf imported in function _print_array
1>readtemp.obj : warning LNK4049: locally defined symbol _printf imported
1>presshum.obj : warning LNK4217: locally defined symbol _sprintf_s imported in function _ReadPressHum
1>readtemp.obj : warning LNK4049: locally defined symbol _sprintf_s imported
1>temp10.obj : warning LNK4049: locally defined symbol _sprintf_s imported
1>presshum.obj : warning LNK4217: locally defined symbol _sprintf imported in function _ReadPressHum
1>temp10.obj : warning LNK4049: locally defined symbol _sprintf imported
1>readtemp.obj : warning LNK4217: locally defined symbol _fprintf imported in function _main
1>readtemp.obj : error LNK2019: unresolved external symbol __imp____iob_func referenced in function _main
1>readtemp.obj : error LNK2019: unresolved external symbol __imp__scanf referenced in function _mainx
1>readtemp.obj : error LNK2019: unresolved external symbol __imp__sscanf referenced in function _main
1>readtemp.obj : error LNK2001: unresolved external symbol _owErrorStack
1>readtemp.obj : error LNK2001: unresolved external symbol _owErrorPointer
1>readtemp.obj : error LNK2001: unresolved external symbol _owErrorMsg
1>C:\Users\RowanB\Documents\Visual Studio 2015\Projects\readtemp5\readtemp5\Debug\readtemp5.exe : fatal error LNK1120: 6 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
“本地定义的符号导入”错误实际上是什么意思?如何查找导致问题的文件中的哪一行

围绕带下划线的符号名称的规则是什么?如何计算原始符号名称(即,我将在源文件中看到的名称)是什么

我猜问题可能是桌面PC缺少某些头文件、库或DLL,或者安装在其他位置,和/或我没有正确设置项目属性以定位所需的所有文件。但是,我如何确切地找出问题所在,以及如何修复它呢

我在新电脑上安装了WDK,但它没有安装在笔记本电脑上的同一位置(C:\WinDDK)。我真的找不到它放在哪里了。WDK文件在哪里


谢谢-Rowan

在使用一个工作目录在2012和2015编译器之间切换时,我遇到了类似的错误(在两个源代码管理提交之间来回切换,其中一个仍然使用2012构建,另一个使用2015构建)。修复方法只是清理解决方案并重建。如果将整个文件夹复制到新电脑,则可能是2013年的中间生成文件导致了问题