0

Edit: not solved, but as I moved on to other software, I ran into other challenges.

For a research project, I downloaded a Github project (Tagliasacchi et al., 2015) for computer vision to Linux 16.04. I have programming experience with PHP but I am new to C++. When I try to replicate the results of the study on my computer, I run early into a compiling error.

  1. The Hello world-example of the Github project (apps » helloworld) works fine.
  2. When trying to compile another application, I run into an error with the Makefile: cmake . works fine and some files are created. However, make does not work.
  3. After the error, g++ [filename].cpp -o main obviously does not work.

How to solve this and get the dependencies right?

  1. In some cases, there is a Makefile, but I run into an error:

    [ 33%] Building CXX object CMakeFiles/helloworld_atb.dir/main.cpp.o /bin/sh: 1: /usr/bin/g++-4.8: not found CMakeFiles/helloworld_atb.dir/build.make:62: recipe for target 'CMakeFiles/helloworld_atb.dir/main.cpp.o' failed make[2]: *** [CMakeFiles/helloworld_atb.dir/main.cpp.o] Error 127 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/helloworld_atb.dir/all' failed make[1]: *** [CMakeFiles/helloworld_atb.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

  2. In other cases (e.g. in tracker » HandFinder), I can't run either cmake . or make and compiling using g++ HandFinder.cpp -o handfinder does not work:

    In file included from HandFinder.cpp:1:0: HandFinder.h:2:41: fatal error: tracker/ForwardDeclarations.h: No such file or directory compilation terminated.

Timo
  • 31
  • 1
  • 9
  • "/bin/sh: 1: /usr/bin/g++-4.8: not found" Try to fix that. [This answer](https://stackoverflow.com/a/17275650/7703564) might be helpful as well. – Jodocus Mar 26 '18 at 12:28
  • Thank you for your reply. When I first execute `export CC=/usr/local/bin/gcc` and `export CXX=/usr/local/bin/g++` (as suggested by Jodocus), the `cmake` command seems to work. However, when I try to compile main.cpp, I get the error `helloworld_atb/main.cpp:2:18: fatal error: QDebug: No such file or directory compilation terminated.` – Timo Mar 26 '18 at 12:48
  • You need to install the Qt libraries and set the paths accordingly as well. – Jodocus Mar 26 '18 at 12:59

0 Answers0