开发者

How to add specific header folders to Eclipse?

开发者 https://www.devze.com 2023-02-07 01:14 出处:网络
I have a c++ project in a unix environment, that has a CMakeLists.txt. I used Cmake to convert it into an Eclipse project and import it in Eclipse CDT. Now, it says it can\'t find files in #include \"

I have a c++ project in a unix environment, that has a CMakeLists.txt. I used Cmake to convert it into an Eclipse project and import it in Eclipse CDT. Now, it says it can't find files in #include "file.h" statements.

This project has more than 20 folders and some of these folders contain the headers. I went to Project Properties -> Include P开发者_StackOverflowath and Symbols and added them there, but they don't appear in the Includes folder in my project, after rebuild. I don't understand why is it such a heavy task to do something so simple..


You can specify include directories in the original CMakeLists.txt using the include_directories command and re-generate the Eclipse project. This has the advantage over specifying the include directories in Eclipse because it will work for other CMake targets as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消