Closed divyanshu132 closed 5 years ago
Hi @divyanshu132, I tried to reproduce the same error but the file successfully compiled and ran. Can you please check if you have linked the header files to the g++ compiler.
@divyanshu132 you are not pointing g++
with -I
where to find Boost headers.
Here, GCC 8.2 compiles the example using Bosot 1.69 and runs it without any errors: https://wandbox.org/permlink/fc3t9b3rN6cMizmh
It uses the -I
in the command line it uses:
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/gcc-8.2.0/include -std=c++11
You need to do similar, with path specific to your installation/environment.