简体   繁体   English

Visual Studio C ++问题,包括POCO

[英]Visual studio c++ problems including poco

I am new to c++ and visual studio and am struggling with getting an include statement to work. 我是C ++和Visual Studio的新手,正在努力使include语句起作用。 I want to test out poco for online applications with c++ and found a basic example online that used 我想用c ++测试poco的在线应用程序,并找到一个使用

#include <Poco/String.h>

However, my Win32 project in visual studio throws an error stating "could not open include file". 但是,我在Visual Studio中的Win32项目抛出一个错误,指出“无法打开包含文件”。 I added the path to project properties < VC++ Directories < Include Directories. 我将路径添加到项目属性<VC ++目录<包括目录。 I also added the path to linker < input < additional dependencies. 我还添加了链接器<输入<其他依赖项的路径。 I can't seem to get rid of that red underline and error though. 我似乎无法摆脱红色下划线和错误。 When I am typing my include statement a list pops up but the directory listed is the "...Windows Kits\\8.1\\um\\\u0026quot;. 当我键入include语句时,会弹出一个列表,但列出的目录是“ ... Windows Kits \\ 8.1 \\ um \\”。 Could anybody lend me a hand? 有人可以帮我吗? I really appreciate any help. 我非常感谢您的帮助。 Thank you. 谢谢。 Let me know if I can provide more info. 让我知道是否可以提供更多信息。

It should be added to 'C/C++ > Additional Include directories' and it should be added as: 应该将其添加到“ C / C ++>其他包含目录”,并且应将其添加为:

c:/some_folders_down c:/ some_folders_down

not

c:/some_folders_down/Poco c:/ some_folders_down / Poco

You say, 'Adding the directory'. 您说,“添加目录”。 You don't want to add the Poco folder to your path because when you #include <Poco/String.h> you are adding that part of the path there. 您不想将Poco文件夹添加到路径中,因为当您#include <Poco / String.h>时,您是在其中添加路径的那一部分。 Try: 尝试:

#include <String.h>, if that works, fix your additional include path. #include <String.h>,如果可行,请修复附加的include路径。 Would you paste that path? 您会粘贴该路径吗?

So apparently the default for visual studio is to add the the "additional directories" paths to Debug x64 since I am on a 64 bit OS. 显然,Visual Studio的默认设置是将“其他目录”路径添加到Debug x64,因为我使用的是64位操作系统。 However, I forgot to switch to x64 in the solution platform drop down at the top of the VS window. 但是,我忘了在VS窗口顶部的解决方案平台下拉菜单中切换到x64。 If you right click on the .vcxproj and search for "AdditionalIncludeDirectories" you can view this directly. 如果右键单击.vcxproj并搜索“ AdditionalIncludeDirectories”,则可以直接查看。 I feel like a facepalm is in order haha. 我感觉像是脸部护理是为了哈哈。 Thanks so much to everyone who viewed my question. 非常感谢所有查看我的问题的人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM