i have trouble building my c++ code in VS Code. For some reason, i can compile my code using g++ in a linux terminal, but when i try building my project in VS Code to debug it, it says that it cannot find my "boost" library. I have added the path in the tasks.json by adding -Lpath/to/dir
and -lboost
to the arguments. I also added the -verbose
argument to see what the output is.
The ouput looks like this:
attempt to open /usr/include/libboost.so failed
attempt to open /usr/include/libboost.a failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libboost.so failed
The output is longer, but you get the point.
the output ends with ld: cannot find -lboost
.
Now i have seen something with using the ln
command, but i am not sure what to link to what or why this problem occurs in the first place. I would very much appreciate any help.
The library Name specified in the -l flag turned out to be wrong.