Boost library won’t work with GCC, code must be compiled with G++.


For c++ you should use g++.

It’s the same compiler (e.g. the GNU compiler collection). GCC or G++ just choose a different front-end with different default options.

In a nutshell: if you use g++ the frontend will tell the linker that you may want to link with the C++ standard libraries. The gcc frontend won’t do that (also it could link with them if you pass the right command line options).