917
questions
3
votes
1
answer
81
views
Add missing includes without path
I am using clangd with VSCode. Clangd offers the possibility to add missing includes. When doing so, it (sometimes? couldn´t figure out when) automatically adds the relative or absolute path to the ...
0
votes
1
answer
62
views
How do I include a .h file, located in an upper level directory? С++
So, for instance I have a bunch of files:
root-dir:
dir-a:
read.cpp
dir-b:
code.cpp
lib.cpp
lib.h
lib's files:
//lib.cpp
#include <string>
using namespace std;
string edit(...
0
votes
1
answer
43
views
bazel cc_binary - how to use copts -I<label>
I'm looking for a way to provide a label as argument to a copts -I value and don't know, if this is even possible.
cc_library(
name = "foo",
srcs = ["src/func.cxx"],
...
0
votes
1
answer
62
views
C++, Eigen library, #include does not see the file/directory [duplicate]
My #include <Eigen/Dense> gives the error: No such file or directory.
I followed tutorials on how to include it, my outcome appears to be different.
My tasks.json is:
{
"tasks": [
...
0
votes
0
answers
49
views
clang++ ignores -fno-exceptions if header is included from -isystem directory
Let's say I have main.cpp that includes utils.h from lib directory:
lib/utils.h:
#ifndef LIB_UTILS_H
#define LIB_UTILS_H
inline void util() {
throw 13;
}
#endif // LIB_UTILS_H
main.cpp:
#include &...
0
votes
1
answer
38
views
How to update includePath without using quick fix? [duplicate]
I'm using the C extension for vs code and have this error. All the tutorials online led to clicking "Quick Fix" followed by "Edit includePath settings", but there is no such option ...
1
vote
1
answer
103
views
KDevelop not finding easy C++ include file
I'm new to KDevelop. I'm trying to build a C++ program that starts with
#include <GLFW/glfw3.h>
But it can't find it.
This header is located at
/usr/include
GCC is supposed to look at this ...
0
votes
0
answers
139
views
Try to include <torch/torch.h> -- Always reporting error
I want to #include <torch/torch.h> in C++ env of VS Code.
My try
I tried to use absolute include path:
#include <C:/Users/Felix/AppData/Local/Programs/Python/Python310/Lib/site-packages/...
0
votes
0
answers
13
views
ros c_cpp_properties.json path is not a directory
i'm editing my file c_cpp_properties.json in order to add elements in includePath[].
Even if the path exists, i got this error (https://i.sstatic.net/1KPUmjI3.png)
I use vscode on ubuntu20.04.
Does ...
-2
votes
1
answer
51
views
include error detected on vscode header file what should I do?
#ifndef SYMNMF_H_
#define SYMNMF_H_
void symc (double **, double **,int,int);
void ddgc (double **, double **,int);
void normc (double **,double **,double **,int);
void symnmfc(double **, double **, ...
0
votes
0
answers
22
views
CWD contains files with same names as system headers [duplicate]
If the current directory contains a file with the same name as a system header, the compiler will first search the current directory even for includes from within system headers.
Is there a way to ...
0
votes
0
answers
57
views
I have an error which suggests that I must update includePath otherwise the error is File.h: No such file or directory gcc
SCREENSHOT PICTURE
In folder source
The prototype in the file control.h:
#include <stdio.h>
#include <stdbool.h>
double rectangularArea (double width, double height);
The file main.c:
...
0
votes
0
answers
18
views
Header file errors
I am new to MPLABx harmony and getting this error even after adding these header files. So how to remove this error?
I am performing this task in linux.
make -f nbproject/Makefile-default.mk ...
0
votes
1
answer
99
views
am having an error in php Failed to open stream: No such file or directory '../config.php'.the last is a file to make a cnx with db
im a still a student , this is my first web project and am using the MVC strcuter
when i try to run the whole project this error comes'Warning: include(): Failed opening '../config.php' for inclusion (...
0
votes
0
answers
31
views
Error in including paths from Ubuntu WSL to VSCode
I am trying to make a new T-Motor Thunder 300A 24s ESC driver. Although I am a rookie in building code, I am trying this on Ubuntu WSL on Windows 10 and having trouble with the includes in various ...
0
votes
0
answers
94
views
VS code : #include<execution> :-#include errors detected. Please update your includePath
I am trying to include a header file in my Visual Studio "imtanan.cpp" file.
The header "#include" shows error
which says :- "#include errors detected. Please update your ...
0
votes
1
answer
206
views
No such file or directory #include <iostream>
I use Visual Studio Code, and i have a problem with the extension for the C++.
When i include iostream it returns me that error:
#include errors detected. Please update your includePath. Squiggles ...
-1
votes
1
answer
33
views
Including a file outside of local directory
I have a project, laid out like this.
/Project Folder
/Header file
/Sub folder
/Sub folder
/Source file
If I want to include the header file in the source file, what path ...
1
vote
1
answer
67
views
How to get xlocinfo.h for cl toolset?
I need to compile this C file on multiple platforms:
#include <xlocinfo.h>
int main() {
return 0;
}
I can successfully compile this file with gcc in w64devkit:
C:/dev/scratch $ gcc -g ./main....
0
votes
0
answers
196
views
Cannot find boost header files using #include <boost/asio/file.hpp>
Compiler is saying that it cannot find header files using the #include paths already included in every header file in the boost files. Have tried adding include paths in c++ properties file, but it ...
0
votes
1
answer
54
views
How to handle inconsistent availability of packages in standard search locations in C build system files or build system generator files?
I've been learning recently about the relationship between Linux distributions and their respective repositories and packages from various sources including this, this, and this.
I will use the ...
0
votes
0
answers
30
views
"slippery" Cmake variable inside of generator expression refuses concatenation
Background
I'm trying to add proper cmake install suppport to another project.
Everything seems fine, until I attempt to do the following:
target_include_directories(my_target INTERFACE
$<...
2
votes
1
answer
181
views
How should I conditionally set -isystem and -L flags in CMake?
I have a project that is to be compiled for Linux and Windows. Compilation for the former is done in a Linux environment, and compilation for the latter is done in w64devkit, i.e. I don't need to ...
0
votes
1
answer
494
views
Why does VScode say SDL.h: No such file or directory
I have the SDL "include" folder inside my workspace, and while typing the code visual studio seems to recognize that the file exists. But whenever I try running it, I get this error:
enter ...
0
votes
0
answers
38
views
Getting issues while adding a external library(libcurl) in c++ with vs code
I'm new in programming. I'm working on a project where I need a external library libcurl. After building my code it shows 'builded successfully' but when I run it it shows this error:
fatal error: ...
0
votes
1
answer
278
views
VS Code c_cpp_configuration.json includePath with ** for kernel headers doesn't work
While developing a Linux kernel module in VS Code, I stumbled upon an interesting behaviour.
With this c_cpp_properties.json:
{
"configurations": [
{
"name"...
0
votes
0
answers
30
views
Why VSCode is unable to include C++ header file qobject.h inspite of specifying the include path? [duplicate]
I am learning Coin3D and hence running an example C++ program that uses SoQt.h library:
#include <Inventor/Qt/SoQt.h>
That's when I am getting this error:
In file included from /home/xxx/...
0
votes
1
answer
140
views
VSCode on Mac arm64 doesn't seem to recognize symlinks in includePath
I am trying to compile/debug a C program with VSCode that I intend to port from Linux to MacOS (Mac Studio). The program uses the arb arbitrary precision library that I installed with homebrew. My ...
0
votes
0
answers
106
views
gcc -MMD omits local header files
I'm invoking gcc with -MMD, and it lists some, but not all, the header files.
I've copied the FreeRTOS source into my project, include those files via #include <...>, and set the the -I path in ...
0
votes
0
answers
42
views
Why can’t visual studio open tinyfiledialogs.h?
It says there is no such file or directory
i put header file in header files and source file in source files and put the directory for the files in “additional include directories” and i thought the ...
1
vote
0
answers
99
views
How to define a path to a data directory in gnu assembler?
To start, I had all my data in the same directory as my source code:
.image_01: .incbin "image_01.bin"
.image_02: .incbin "image_02.bin"
This is of course a mess and a bad ...
0
votes
1
answer
90
views
Find the place where the current target directory is added as "include directory" to generated Visual Studio project
I have a quite large CMake-based project and found that while generating solution for Visual Studio on Windows I got current project home directory as an include directory. E.g. here's content of root ...
1
vote
1
answer
775
views
Add All Folders Named "inc/" to Additional Include Path in Visual Studio 2022
I am working with a C project in Visual Studio 2022 Visual C++. There are multiple libraries included in the source code and all of them contain an inc/ directory for header files. I am trying to add ...
2
votes
0
answers
1k
views
VS Code includePath issues with Homebrew installed packages for C++
Trying to learn C++ so I have to install libraries, however these being found by VScode.
I have installed some of them via Homebrew since that was the most simple way to get started because I've used ...
0
votes
0
answers
185
views
Enabling C++ linkage for Emscripten compilation
EDIT: the linkage is for the #include directives for the .h files. I figured out that the error occurs when the same #include statements is declared twice in different .cpp files.
I m trying to use ...
1
vote
2
answers
209
views
Given two absolute paths A and B, how to get the relative path from A to B
I have a programm which generates a header and a source file, both can be stored in different directionaries from each other. I want to have the header file as an include in the source file, here is ...
0
votes
0
answers
173
views
VSCode Intellisense: c_cpp_properties.json Cannot Find Certain Folders
I am current working on VSCode 1.78.2 with C/C++ extension, and I want to include libappindicator/app-indicator.h from appindicator3-0.1.
To make sure Intellisense work, I ran pkg-config --cflags gtk+-...
0
votes
1
answer
440
views
"preLaunchTask 'build release' terminated with exit code 2" include path error in vscode when using raylib
I've been trying to setup raylib with visual studio code but my include paths seem to be messed up. whenever I try to run the program I get this error which from what I understand means that my ...
0
votes
0
answers
301
views
in C on VS code, how do I fix "#include errors detected. Please update your includePath" on Mac?
Error when using #include:
#include errors detected. Please update your includePath.
new to C, I can't get this error fixed and I don't know how it occurred, given that I didn't touch VC code ...
1
vote
1
answer
520
views
scrapper.cpp:3:10: fatal error: 'cpr/cpr.h' file not found #include "cpr/cpr.h"
I'm new to programming. I'm currently working on a web scrapper using C++. I'm using the cpr and gumbo libraries (installed using vcpkg).
Whenever I try to run my code I get the error,
scrapper.cpp:3:...
0
votes
1
answer
253
views
Building C++ code with components in CMake
I have a C++ project which can be compiled using cmake command with no error.
The problem is that I can't find the BaseCode.cpp.o and BaseCode.cpp.o.d in the build folder, also, when I run make ...
1
vote
2
answers
1k
views
Using MS Visual Studio Code, how do I access an MPI library in a Fortran code?
I am coding and running a physics simulation in Fortran using MS Visual Studio Code on Windows 11 and I want to use MPI. I have installed Microsoft MPI (MSMPI) and know that it is correctly installed. ...
0
votes
1
answer
497
views
How can I tell CMake to put include directory flags after the compiler option flags in its object compile command?
I am facing problems due to the target holding the include paths first and then the compiler options after. How can I set the include paths after the compiler options for compiling source files of a ...
1
vote
1
answer
114
views
Why could GCC prefer to use stdio.h file from later in the include path?
While compiling a Ruby gem's native extension, I get this error according to logs:
LD_LIBRARY_PATH=.:/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.1.3_1/lib "gcc-12 -M -o conftest -I/home/...
0
votes
0
answers
958
views
Visual Studio Code cannot open source file "iostream"C/C++(1696) on Windows
I have already checked out this Question but i could not find anything what would solve the issue for me.
what ever c++ project i start on Visual Studio Code the C++ IntelliSence shows me an error for ...
-1
votes
1
answer
515
views
Running C file in Visual Studio Code (Windows) without error - #include stdio.h cannot open source file
How to run a C file in Visual Studio without:
having error message #include stdio.h cannot open source file; and
not download mingw for Visual Studio Code?
1
vote
1
answer
74
views
Is include path lookup somehow supported in the standard library?
I know the C++ standard library caters to C++ programs, not C++ compilers. But - is there some facility in the standard library for looking up include files - on the filesystem or wherever they would ...
0
votes
0
answers
451
views
In the CPPTools extension for VS Code, is /** really recursive?
I just opened a folder (based on this setup) in VS Code (1.74) containing C code I would like to be handled by the CPPTools extension (1.13.8). Within the folder (.../rd-infra/arm-tf), there is an ...
2
votes
1
answer
483
views
Pyenv-installed Python creates virtualenv with empty include dir, no python-config in bin
Note: There are several similar questions, which I have seen and read. None of them are the precise problem I'm having, and none of their answers work for me.
I have installed several Python versions (...
1
vote
0
answers
151
views
VSCode: How to define unique includePaths for each core (sub-directories) in STM32h7 dual-core project within same git repo?
I have a git repository for a STM32 H7 dual-core project. Opening the repo-level folder my structure looks like the following:
PARENT DIRECTORY (STM32H755)
├── .git
├── .vscode
│ └── ...