最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Cannot add new folder and files to existing folder Visual Studio C++ - Stack Overflow

programmeradmin4浏览0评论

i'm trying to add new filter (folder) and files to my MFC C++ project in Visual Studio 2015. however after new folder is added, i'm unable to build the project. here is the details what i did.

My project structure is such

Project 
├── Project.vcxproj 
├── Util <--- this is new folder i want to add
│   ├── CSVFileHandler.cpp 
│   └── CSVFileHandler.h

after adding new filter and files via Solution Explorer, i've also manually added the folder to the project located in File Explorer. and then i added the relative path of the folder to the Project.vcxproj file such

<ItemGroup> 
<ClInclude Include="..\Util\CSVFileHandler.h" /> 
</ItemGroup>

<ItemGroup>
<ClCompile Include="..\Util\CSVFileHandler.cpp" /> 
</ItemGroup>

i've also add the relative path to the VC++\Additional Include Directories. however, when building the project, i got the error such

Error C1083 Cannot open source file: '..\Util\CSVFileHandler.cpp': No such file or directory

发布评论

评论列表(0)

  1. 暂无评论