How do you add libraries to Eclipse CDT? (No such file or directory)

后端 未结 5 2065
梦谈多话
梦谈多话 2021-01-19 12:27

I\'m having some issues adding header libraries.

I right click on my project, and click Properties-> C/C++ General-> Paths and Symbols.

In

5条回答
  •  一个人的身影
    2021-01-19 12:56

    I right click on my project, and click Properties-> C/C++ General-> Paths and Symbols.

    In the Includes tab: Languages-> GNU C++

    I click on Add... -> File system then add the folder called boost_1_52_0, or any other folder.

    When I use Eclipse's intellisense, it finds the that I desire, however it fails on building.

    Yes, that's what you might need to keep Eclipse CDT intellisense and the indexer in sync with your external references.

    fatal error: boost/random/...: No such file or directory
    

    Not sure why this is happening.

    This is because your settings for how to build the project might choose you're going to manage the build process yourself: CDT C/C++ Build Properties

    If so, you have to let know your manually managed makefile know about the environment and compiler/linker flag settings.

    A way to communicate with the manually managed makefile with the Eclipse CDT build properties for such cases, is to use e.g. Build Variables or Environment settings from the mentioned project property section: enter image description here

提交回复
热议问题