0

I'm working on a Linux distribution using Eclipse on a C++ project. We're trying to port everything over from a Windows environment (Visual Studio) to a Linux environment (Eclipse) and are having trouble. We have a library that we need, but after importing is giving us a few errors.

For example, in one of our CPP files, we include a class that we need on top.

~~~~~~~~~~.h: No such file or directory

However, I can Ctrl+Shift+R (Open Resource) and type in the exact same name, and Eclipse can find and view that file.

To include this library, we went to:

  • Project Properties -> C/C++ General -> Paths and Symbols -> Source Location

and we added the folder there. Is there any reason why this isn't working correctly? Do we need to link it anywhere else?

Xavier Guihot
  • 54,987
  • 21
  • 291
  • 190
Devin
  • 1
  • 1
  • Maybe [this](https://stackoverflow.com/questions/24715864/problems-importing-libraries-to-my-c-project-how-to-fix-this) helps. –  Feb 05 '18 at 19:30
  • @TheDude Thanks for the suggestion, but I've tried multiple ways of including the source, including the one that you linked. I cannot do it that way anyway since I have my own make file and I don't have those settings (Tool Settings) – Devin Feb 05 '18 at 19:35
  • If you have your own build system anyways, what's hindering you to override/add to the [`$CXX_FLAGS`](https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html) make standard variable in your hand rolled makefile, and add `-I` include paths and `-L` for the library paths? Do you know your tools? –  Feb 05 '18 at 19:39
  • My approach to non-eclipse C++ projects inside Eclipse (the key point is to have a separate eclipse-project directory and then link external source directories to it): https://stackoverflow.com/questions/38131663/qt-development-on-linux-using-eclipse/38140914#38140914 You can then adjust the "Make Target" part so it calls `make`. – Velkan Feb 06 '18 at 15:59

0 Answers0