1. 程式人生 > 程式設計 >解析VScode在Windows環境下c_cpp_properties.json檔案配置問題(推薦)

解析VScode在Windows環境下c_cpp_properties.json檔案配置問題(推薦)

初次使用VScode,我們都會碰到一個問題,就是在編寫C和C++原始檔時,標頭檔案提示未配置好等錯誤。關於這個問題,給出方案如下:我想大家碰到的最多的問題就是"includepath"的設定問題:

1. "C:/MinGW/include/**"為你們下載的MinGW的include資料夾路徑
2.“c:/mingw/bin/…/lib/gcc/mingw32/6.3.0/include/c++”,
“c:/mingw/bin/…/lib/gcc/mingw32/6.3.0/include/c++”,
“c:/mingw/bin/…/lib/gcc/mingw32/6.3.0/include/c++/mingw32”,
“c:/mingw/bin/…/lib/gcc/mingw32/6.3.0/include/c++/backward”,

“c:/mingw/bin/…/lib/gcc/mingw32/6.3.0/include”,
“c:/mingw/bin/…/lib/gcc/mingw32/6.3.0/…/…/…/…/include”,
"c:/mingw/bin/…/lib/gcc/mingw32/6.3.0/include-fixed"這一塊的獲取方法為:cmd——》gcc -v -E -x c++ -

3.獲取結果如下圖所示:

](https://img-blog.csdnimg.cn/20181119144708654.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MDY5NDUyNw==,size_16,color_FFFFFF,t_70)此圖為VScode中c_cpp_properties.json檔案,其中"includepath"的路徑設定為我們需要解決的問題

總結

到此這篇關於解析VScode在Windows環境下c_cpp_properties.json檔案配置問題(推薦)的文章就介紹到這了,更多相關VScode c_cpp_properties.json檔案配置內容請搜尋我們以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援我們!