System: LMDE4, 64bit, gcc-8.3.0, VS Code
Target File: https://github.com/opencv/opencv/blob/master/samples/cpp/videocapture_camera.cpp
Now as the title says, this starts pissing me off. Nothing is working to fix such a simple issue. And NO I don't want to always use "-I" to tell pretty obvious things to the compiler. Here is what I've done so far.
in c_cpp_properties.json of VS Code:
{"configurations": [ {"name": "Linux","includePath": ["${workspaceFolder}/**","/usr/include/**" ],"defines": [],"compilerPath": "/usr/bin/gcc","cStandard": "c11","cppStandard": "gnu++14","intelliSenseMode": "clang-x64","browse": {"path": ["/usr/include/" ] } } ],"version": 4}
in .bashrc:
#C Includeexport C_INCLUDE_PATH="/usr/include"export C_INCLUDE_PATH=$C_INCLUDE_PATH:"/usr/include/opencv2"#C++ Includeexport CPLUS_INCLUDE_PATH="/usr/include"export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:"/usr/include/c++/8/"export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:"/usr/include/opencv2"#C/C++ Includeexport CPATH="/usr/include"
I am pretty sure that all the .bashrc exports are already a dirty workaround and still I get the following message on compile:
In file included from /usr/include/c++/8/bits/stl_algo.h:59, from /usr/include/c++/8/algorithm:62, from /usr/include/opencv2/core/base.hpp:55, from /usr/include/opencv2/core.hpp:54, from ~/LearnDummy/helloworld.cpp:1:/usr/include/c++/8/cstdlib:75:15: fatal error: stdlib.h: Datei oder Verzeichnis nicht gefunden #include_next <stdlib.h> ^~~~~~~~~~compilation terminated.
Well fine... stdlib.h is unknown (Jesus!)... find /usr -name stdlib.h
gives me
/usr/include/stdlib.h /usr/include/c++/8/stdlib.h /usr/include/c++/8/tr1/stdlib.h /usr/include/x86_64-linux-gnu/bits/stdlib.h /usr/include/i386-linux-gnu/bits/stdlib.h
In addition VS Code already knows(!) where the file is once I click on "Go to Definition" and still gcc is blind. How do I get realiably rid of this?