本文介绍了我如何在Visual Studio中编译此代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我有这个远程应用程序代码(https://svn.reactos.org/reactos/trunk/reactos/base/applications/rapps_new/),我已成功下载到我的电脑上。当我在解决方案中添加所有文件并尝试在Visual Studio中运行代码时,它会让我跟随错误:I have this remote application code (https://svn.reactos.org/reactos/trunk/reactos/base/applications/rapps_new/) which i have successfully downloaded to my PC. when i add all the files in a solution and try to run the code in Visual Studio, it gives me following errors: 27 IntelliSense:identifier" SLIST_HEADER"未定义 c:\Program Files(x86)\ Windows Home Kits \8.1\Include\\\\ winnt.h 17554 16 ConsoleApplication7 12 IntelliSense :标识符"PSLIST_HEADER"未定义 c:\Program Files(x86)\ Windows Wits\8.1\Include\\\\interlockedapi.h 51 11 ConsoleApplication7 13 IntelliSense :标识符"PSLIST_HEADER"未定义 c:\Program Files(x86)\ Windows Wits\8.1\Include\\\\interlockedapi.h 59 13 ConsoleApplication7 14 IntelliSense :标识符"PSLIST_HEADER"未定义 c:\Program Files(x86)\ Windows Wits\8.1\Include\\\\interlockedapi.h 67 13 ConsoleApplication7 15 IntelliSense :标识符"PSLIST_HEADER"未定义 c:\Program Files(x86)\ Windows Wits\8.1\Include\\\\interlockedapi.h 81 13 ConsoleApplication7 16 IntelliSense :标识符"PSLIST_HEADER"未定义 c:\Program Files(x86)\ Windows Wits\8.1\Include\\\\interlockedapi.h 94 13 ConsoleApplication7 17 IntelliSense :标识符"PSLIST_HEADER"未定义 c:\Program Files(x86)\ Windows Wits\8.1\Include\\\\interlockedapi.h 102 10 ConsoleApplication7 26 IntelliSense :标识符"PSLIST_HEADER"未定义 c:\Program Files(x86)\ Windows Home Kits \8.1\Include\\\\ winnt.h 17546 11 ConsoleApplication7 28 IntelliSense :标识符"PSLIST_HEADER"未定义 c:\Program Files(x86)\ Windows Home Kits \8.1\Include\\\\ winnt.h 17561 13 ConsoleApplication7 29 IntelliSense :标识符"PSLIST_HEADER"未定义 c:\Program Files(x86)\ Windows Home Kits \8.1\Include\\\\ winnt.h 17568 13 ConsoleApplication7 30 IntelliSense :标识符"PSLIST_HEADER"未定义 c:\Program Files(x86)\ Windows Home Kits \8.1\Include\\\\ winnt.h 17576 13 ConsoleApplication7 31 IntelliSense :标识符"PSLIST_HEADER"未定义 c:\Program Files(x86)\ Windows Home Kits \8.1\Include\\\\ winnt.h 17586 13 ConsoleApplication7 32 IntelliSense :标识符"PSLIST_HEADER"未定义 c:\Program Files(x86)\ Windows Home Kits \8.1\Include\\\\ winnt.h 17593 10 ConsoleApplication7 18 IntelliSense :标识符"PCONTEXT"未定义 c:\Program Files(x86)\ Windows Wits\8.1 \Include\\\\minwinbase.h 358 9 ConsoleApplication7 20 IntelliSense :标识符"PCONTEXT"未定义 c:\Program Files(x86)\ Windows Home Kits \8.1\Include\\\\WinBase.h 1279 14 ConsoleApplication7 21 IntelliSense :标识符"PCONTEXT"未定义 c:\Program Files(x86)\ Windows Home Kits \8.1\Include\\\\WinBase.h 8628 13 ConsoleApplication7 22 IntelliSense :标识符"PCONTEXT"未定义 c:\Program Files(x86)\ Windows Home Kits \8.1\Include\\\\WinBase.h 8630 10 ConsoleApplication7 23 IntelliSense :标识符"PCONTEXT"未定义 c:\Program Files(x86)\ Windows Home Kits \8.1\Include\\\\WinBase.h 8646 11 ConsoleApplication7 25 IntelliSense :标识符"PCONTEXT"未定义 c:\Program Files(x86)\ Windows Home Kits \8.1\Include\\\\ winnt.h 16935 11 ConsoleApplication7 19 IntelliSense :标识符"CONTEXT"未定义 c:\Program Files(x86)\ Windows Home Kits \8.1\Include\\\\ processthreadsapi.h 870 16 ConsoleApplication7 34 IntelliSense :无法打开源文件"rappsmsg_new.h" c:\Users\Abrar Hassan Malik \Desktop\ReactOS\base \applications\rapps_new\rapps.h 27 1 ConsoleApplication7 33 IntelliSense:无法打开源文件" ndk / rtlfuncs.h" c:\Users \阿布拉尔·哈桑·马利克\\Desktop \ ReactOS \ base \applications \ rapps_new \ rapps.h 25 1 ConsoleApplication7 24 IntelliSense:#error指令:"无目标架构" c:\程序文件(x86)\ Windows Wits \8.1 \ Include\\\\ winnt.h 147 2 ConsoleApplication7 错误 c:\program files(x86)\windows kits\8.1\include\\\\ winnt.h 147 1 ConsoleApplication7 错误 2 错误C1189:#error: " No Target Architecture" c:\program files(x86)\windows kits\8.1\include\\\\ winnt.h 147 1 ConsoleApplication7 错误 3 错误C1189:#error: " No Target Architecture" c:\program files(x86)\windows kits\8.1 \\ \\include\um\winnt.h 147 1 ConsoleApplication7 错误 4 错误C1189:#error: " No Target Architecture" c:\program files(x86)\windows kits\8.1\include\\\\ winnt.h 147 1 ConsoleApplication7 错误 5 错误C1189:#error: " No Target Architecture" c:\program files(x86)\windows kits \ 8.1\include\um\winnt.h 147 1 ConsoleApplication7 错误 6 错误C1189:#error: " No Targe t架构" c:\program files(x86)\windows kits\8.1\include\\\\\ 147 1 ConsoleApplication7 错误 7 错误C1189:#error: " No Target Architecture" c:\program files(x86)\ windows kits\8.1\include\\\\winnt.h 147 1 ConsoleApplication7 错误 8 错误C1189:#error: " No Target Architecture" c:\program files(x86)\windows kits \8.1 \\ \\include\um\winnt.h 147 1 ConsoleApplication7 错误 9 错误C1189:#error: " No Target Architecture" c :\program files(x86)\ windows与kits \8.1 \ include.hum \ winnt.h 147 1 ConsoleApplication7 错误 10 错误C1189:#error: " No Target Architecture" c:\program files(x86)\windows kits\8.1 \include\\\\ winnt.h 147 1 ConsoleApplication7 错误 11 错误C1189:#error: " No Target Architecture" c:\program files(x86)\ windows与kits \8.1 \include \\\\ winnt.h 147 1 ConsoleApplication727 IntelliSense: identifier "SLIST_HEADER" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h17554 16ConsoleApplication712 IntelliSense: identifier "PSLIST_HEADER" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\interlockedapi.h51 11ConsoleApplication713 IntelliSense: identifier "PSLIST_HEADER" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\interlockedapi.h59 13ConsoleApplication714 IntelliSense: identifier "PSLIST_HEADER" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\interlockedapi.h67 13ConsoleApplication715 IntelliSense: identifier "PSLIST_HEADER" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\interlockedapi.h81 13ConsoleApplication716 IntelliSense: identifier "PSLIST_HEADER" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\interlockedapi.h94 13ConsoleApplication717 IntelliSense: identifier "PSLIST_HEADER" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\interlockedapi.h102 10ConsoleApplication726 IntelliSense: identifier "PSLIST_HEADER" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h17546 11ConsoleApplication728 IntelliSense: identifier "PSLIST_HEADER" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h17561 13ConsoleApplication729 IntelliSense: identifier "PSLIST_HEADER" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h17568 13ConsoleApplication730 IntelliSense: identifier "PSLIST_HEADER" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h17576 13ConsoleApplication731 IntelliSense: identifier "PSLIST_HEADER" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h17586 13ConsoleApplication732 IntelliSense: identifier "PSLIST_HEADER" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h17593 10ConsoleApplication718 IntelliSense: identifier "PCONTEXT" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\minwinbase.h358 9ConsoleApplication720 IntelliSense: identifier "PCONTEXT" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\WinBase.h1279 14ConsoleApplication721 IntelliSense: identifier "PCONTEXT" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\WinBase.h8628 13ConsoleApplication722 IntelliSense: identifier "PCONTEXT" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\WinBase.h8630 10ConsoleApplication723 IntelliSense: identifier "PCONTEXT" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\WinBase.h8646 11ConsoleApplication725 IntelliSense: identifier "PCONTEXT" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h16935 11ConsoleApplication719 IntelliSense: identifier "CONTEXT" is undefinedc:\Program Files (x86)\Windows Kits\8.1\Include\um\processthreadsapi.h870 16ConsoleApplication734 IntelliSense: cannot open source file "rappsmsg_new.h"c:\Users\Abrar Hassan Malik\Desktop\ReactOS\base\applications\rapps_new\rapps.h27 1ConsoleApplication733 IntelliSense: cannot open source file "ndk/rtlfuncs.h"c:\Users\Abrar Hassan Malik\Desktop\ReactOS\base\applications\rapps_new\rapps.h25 1ConsoleApplication724 IntelliSense: #error directive: "No Target Architecture"c:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h147 2ConsoleApplication7Error 1error C1189: #error : "No Target Architecture"c:\program files (x86)\windows kits\8.1\include\um\winnt.h147 1ConsoleApplication7Error 2error C1189: #error : "No Target Architecture"c:\program files (x86)\windows kits\8.1\include\um\winnt.h147 1ConsoleApplication7Error 3error C1189: #error : "No Target Architecture"c:\program files (x86)\windows kits\8.1\include\um\winnt.h147 1ConsoleApplication7Error 4error C1189: #error : "No Target Architecture"c:\program files (x86)\windows kits\8.1\include\um\winnt.h147 1ConsoleApplication7Error 5error C1189: #error : "No Target Architecture"c:\program files (x86)\windows kits\8.1\include\um\winnt.h147 1ConsoleApplication7Error 6error C1189: #error : "No Target Architecture"c:\program files (x86)\windows kits\8.1\include\um\winnt.h147 1ConsoleApplication7Error 7error C1189: #error : "No Target Architecture"c:\program files (x86)\windows kits\8.1\include\um\winnt.h147 1ConsoleApplication7Error 8error C1189: #error : "No Target Architecture"c:\program files (x86)\windows kits\8.1\include\um\winnt.h147 1ConsoleApplication7Error 9error C1189: #error : "No Target Architecture"c:\program files (x86)\windows kits\8.1\include\um\winnt.h147 1ConsoleApplication7Error 10error C1189: #error : "No Target Architecture"c:\program files (x86)\windows kits\8.1\include\um\winnt.h147 1ConsoleApplication7Error 11error C1189: #error : "No Target Architecture"c:\program files (x86)\windows kits\8.1\include\um\winnt.h147 1ConsoleApplication7我如何让这个工作?我已经尝试使用父目录中的cmakelists.txt通过cmake生成二进制文件(https://svn.reactos.org/reactos/trunk/reactos/),但我不知道如何链接或添加到我的代码中适当的,因为它是工作,如果它们首先需要的话。How do i get this to work? I have tried generating the binary files through cmake using the cmakelists.txt in the parent directory (https://svn.reactos.org/reactos/trunk/reactos/) but i have no idea how to link or add them to my code appropriately, for it to work, if they are at all needed in the first place.推荐答案 正如您可能理解的那样,Reactos是一个"替代Windows"。项目及其工具包与Microsoft自己的SDK或WDK并不完全一致。你最好的选择是询问他们使用哪个工具包来构建他们的东西,以及如何。As you possibly understand, Reactos is an "alternative Windows" project and their toolkit is not exactly aligned with Microsoft's own SDK or WDK. Your best bet is asking them which toolkit to use to build their stuff, and how.在WDK中定义了SLIST_HEADER所以你可能需要安装WDK,并略微调整项目包括使用WDK。 SLIST_HEADER is defined in the WDK so maybe you need to install the WDK, and slightly tweak the project includes to use the WDK. - pa 这篇关于我如何在Visual Studio中编译此代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-10 22:24