Почему Clang не может найти библиотеки Boost, несмотря на то, что они добавлены в PATH?C++

Программы на C++. Форум разработчиков
Ответить Пред. темаСлед. тема
Anonymous
 Почему Clang не может найти библиотеки Boost, несмотря на то, что они добавлены в PATH?

Сообщение Anonymous »


I am trying to include Boost Libraries in my C++ script after installing it, but I am getting the following error message by the intellisense:

#include

'boost/iterator/counting_iterator.hpp' file not found clang(pp_file_not_found) I have attempted to look into the existing/similar questions on SO but none of them seem to help me figuring this out. I have gone through all steps of configuring my vscode for C++ development and I already can compile, link, build, and run c++ codes but as soon as I want to use boost libraries, the intellisence start to throw errors. Here are my configuration files in the vscode:

tasks.json

{ "version": "2.0.0", "tasks": [ { "label": "build myfile", "type": "shell", "command": "g++", "args": [ "-std=c++14", "-g", "-o", "${fileBasenameNoExtension}.exe", "${fileBasename}", "-I", "C:/Program Files/boost_1_84_0/include/boost-1_84", "-L", "C:/Program Files/boost_1_84_0/lib" ], "group": { "kind": "build", "isDefault": true } } ] } settings.json

{ "files.associations": { "*.tcc": "cpp", "cctype": "cpp", "clocale": "cpp", "cstddef": "cpp", "cstdint": "cpp", "cstdio": "cpp", "cstdlib": "cpp", "cwchar": "cpp", "cwctype": "cpp", "exception": "cpp", "initializer_list": "cpp", "iosfwd": "cpp", "iostream": "cpp", "istream": "cpp", "limits": "cpp", "new": "cpp", "ostream": "cpp", "streambuf": "cpp", "type_traits": "cpp", "typeinfo": "cpp" }, "C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat", "C_Cpp_Runner.cCompilerPath": "gcc", "C_Cpp_Runner.cppCompilerPath": "g++", "C_Cpp_Runner.debuggerPath": "gdb", "C_Cpp_Runner.cStandard": "", "C_Cpp_Runner.cppStandard": "", "C_Cpp_Runner.useMsvc": false, "C_Cpp_Runner.warnings": [ "-Wall", "-Wextra", "-Wpedantic", "-Wshadow", "-Wformat=2", "-Wcast-align", "-Wconversion", "-Wsign-conversion", "-Wnull-dereference" ], "C_Cpp_Runner.msvcWarnings": [ "/W4", "/permissive-", "/w14242", "/w14287", "/w14296", "/w14311", "/w14826", "/w44062", "/w44242", "/w14905", "/w14906", "/w14263", "/w44265", "/w14928" ], "C_Cpp_Runner.enableWarnings": true, "C_Cpp_Runner.warningsAsError": false, "C_Cpp_Runner.compilerArgs": [], "C_Cpp_Runner.linkerArgs": [], "C_Cpp_Runner.includePaths": [ "C:/Program Files/boost_1_84_0/include" ], "C_Cpp_Runner.includeSearch": [ "*", "**/*" ], "C_Cpp_Runner.excludeSearch": [ "**/build", "**/build/**", "**/.*", "**/.*/**", "**/.vscode", "**/.vscode/**" ], "C_Cpp_Runner.useAddressSanitizer": false, "C_Cpp_Runner.useUndefinedSanitizer": false, "C_Cpp_Runner.useLeakSanitizer": false, "C_Cpp_Runner.showCompilationTime": false, "C_Cpp_Runner.useLinkTimeOptimization": false, "C_Cpp_Runner.msvcSecureNoWarnings": false, "C_Cpp.default.cppStandard": "" } launch.json

{ "version": "0.2.0", "configurations": [ { "name": "(Windows) Launch", "type": "cppvsdbg", "request": "launch", "program": "${workspaceFolder}/${fileBasenameNoExtension}.exe", "args": [], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "console": "externalTerminal" }, { "name": "(Windows) Attach", "type": "cppvsdbg", "request": "attach", "processId": "${command:pickProcess}" }, { "name": "C/C++ Runner: Debug Session", "type": "cppdbg", "request": "launch", "args": [], "stopAtEntry": false, "externalConsole": true, "cwd": "c:/Users/username/Projects/CPP/Workspaces/Script", "program": "c:/Users/username/Projects/CPP/Workspaces/Script/build/Debug/outDebug", "MIMode": "gdb", "miDebuggerPath": "gdb", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ] } ] } and c_cpp_properties.json
{ "configurations": [ { "name": "windows-gcc-x64", "browse": { "path": [ "${workspaceFolder}" ], "limitSymbolsToIncludedHeaders": true }, "includePath": [ "${workspaceFolder}/**", "C:/Program Files/boost_1_84_0/include" ], "defines": [ "_DEBUG", "UNICODE", "_UNICODE" ], "compilerPath": "C:/mingw64/bin/gcc.exe", "cStandard": "${default}", "cppStandard": "${default}", "intelliSenseMode": "windows-gcc-x64" } ], "version": 4 }

Источник: https://stackoverflow.com/questions/781 ... o-the-path
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение
  • Почему Clang не может найти библиотеки Boost, несмотря на то, что они добавлены в PATH?
    Гость » » в форуме C++
    0 Ответы
    34 Просмотры
    Последнее сообщение Гость
  • MacOS Clang Compiler выпуск (Apple Clang версия 17.0.0 (Clang-1700.0.13.5))))
    Anonymous » » в форуме C++
    0 Ответы
    9 Просмотры
    Последнее сообщение Anonymous
  • Является ли Clang-tidy '-Cecks = clang-analyzer-*' падение замены для сканирования и проверки Clang-Analyze?
    Anonymous » » в форуме C++
    0 Ответы
    5 Просмотры
    Последнее сообщение Anonymous
  • Не найден подходящий драйвер для ucanacces, jar и его библиотеки уже добавлены
    Anonymous » » в форуме JAVA
    0 Ответы
    94 Просмотры
    Последнее сообщение Anonymous
  • Ошибка с Cmake и boost. НЕ удалось найти Boost (отсутствует: program_options).
    Anonymous » » в форуме C++
    0 Ответы
    59 Просмотры
    Последнее сообщение Anonymous

Вернуться в «C++»