简体   繁体   中英

Visual studio c++ problems including poco

I am new to c++ and visual studio and am struggling with getting an include statement to work. I want to test out poco for online applications with c++ and found a basic example online that used

#include <Poco/String.h>

However, my Win32 project in visual studio throws an error stating "could not open include file". I added the path to project properties < VC++ Directories < Include Directories. 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;. 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:/some_folders_down

not

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. Try:

#include <String.h>, if that works, fix your additional include path. 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. However, I forgot to switch to x64 in the solution platform drop down at the top of the VS window. If you right click on the .vcxproj and search for "AdditionalIncludeDirectories" you can view this directly. I feel like a facepalm is in order haha. Thanks so much to everyone who viewed my question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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