0

I am trying to include boost in building C++ projects on Ubuntu. The g++ version is 4.8.1 and the boost version is 1.57.0. I followed these instructions to use boost (header only libraries). I put the boost library into ~/opt/lib, and when I try to compile the project I get the following error output:

15:19:47 **** Incremental Build of configuration Debug for project TEST ****
make all 
Building file: ../src/test.cpp
Invoking: GCC C++ Compiler
g++ -include/home/alexander/opt/lib/boost_1_57_0 -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/test.d" -MT"src/test.d" -o "src/test.o" "../src/test.cpp"
In file included from <command-line>:0:0:
/usr/include/stdc-predef.h:39:1: fatal error: /home/alexander/opt/lib/boost_1_57_0: No such file or directory
 #endif
 ^
compilation terminated.
make: *** [src/test.o] Error 1

15:19:48 Build Finished (took 1s.31ms)

What have I made wrong?

Alex
  • 41,580
  • 88
  • 260
  • 469
  • Did you mean `-Iinclude/home/alexander/opt/lib/boost_1_57_0`? – πάντα ῥεῖ Nov 09 '14 at 14:24
  • No, the error message is as I have stated. – Alex Nov 09 '14 at 14:25
  • I didn't mean the error message, but what was passed to the `g++` statement as echoed. As is that doesn't make sense. – πάντα ῥεῖ Nov 09 '14 at 14:26
  • I am using eclipse to compile this project, and I have no idea what eclipse does. So I cannot answer your question. I do not know what makes sense and what not... – Alex Nov 09 '14 at 14:27
  • May be here are some important hints, what actually to do: [Problems importing libraries to my c++ project, how to fix this?](http://stackoverflow.com/questions/24715864/problems-importing-libraries-to-my-c-project-how-to-fix-this) – πάντα ῥεῖ Nov 09 '14 at 14:28
  • Oh I see! I accidentally placed the path into the wrong box (the 'include' box) instead of the 'I' box. Eclipse is a complete configuration nightmare. I guess its way faster to code a project than to set up eclipse for the first time. Thanks anyway. – Alex Nov 09 '14 at 14:32
  • _"Eclipse is a complete configuration nightmare."_ I don't agree. It works pretty well for me. You should know what your toolchain needs, and spot such errors from the build console in 1st place. – πάντα ῥεῖ Nov 09 '14 at 14:35

0 Answers0