Referencing 3rd party Libraries using *relative* paths in Eclipse-CDT

后端 未结 4 654
感情败类
感情败类 2021-01-02 16:10

what is the best practice to reference 3rd party C++ components (e.g. includes, libraries) using relative paths in Eclipse-CDT?

  • I\'m trying to referen
4条回答
  •  半阙折子戏
    2021-01-02 17:00

    I solved this problem using the Preferences->General->Workspace->Linked Resources option.

    Basically you define a variable pointing to your workspace folder.

    Then add to your project the third-party folder using Add folder->Advanced->Link to folder in the filesystem, and use the Variables... button to use the previously created variable to point to the third-party folder (using the Extend button).

    Then you just need to add the folder to your include and library paths in the project settings.

    Easy as cake... :S

提交回复
热议问题