Questions tagged [include-path]

An include path is a set of directories that contain headers or library files that should be accessed with no prefixed directory. Include paths normally include the location of the standard library, locations of third party libraries, and locations of system headers.

897 questions
21
votes
3 answers

PHP include absolute path

I have a variable on my site called $basePath which is set as: $basePath = '/Systems/dgw/'; I am using it on all my css, js and images tags as so (shortened for better visibility):
digicom
  • 538
  • 3
  • 7
  • 20
20
votes
5 answers

How does include path resolution work in require_once?

I was writing an web app in PHP, when I encountered a strange situation. To illustrate my problem, consider a web app of this structure: / index.php f1/ f1.php f2/ f2.php Contents of these files: index.php:
jrharshath
  • 25,975
  • 33
  • 97
  • 127
19
votes
8 answers

vscode "#include errors detected. Please update your includePath

I'm trying to use vscode with arduino but have no success. The problem seems to be something with the libraries path. But I havent been able to fix that ! I'm on linux. "message": "#include errors detected. Please update your includePath.…
harold
  • 307
  • 1
  • 2
  • 9
19
votes
1 answer

How do I prevent a quoted include from searching the directory of the current source file?

gcc provides the -I- option, for which -I directories preceding the -I- are searched for quoted includes (#include "foo.h"), and -I directories following the -I- are searched for bracketed includes (#include ), as well as after the others for…
Mark Adler
  • 101,978
  • 13
  • 118
  • 158
18
votes
5 answers

How to fix "fatal error: opencv2/core.hpp: No such file or directory" for opencv4 installed in manjaro

Essentially, I've been able to install openCV fine for python but I also want to be able to do it for C++. I was able to install it using my linux distro's package manager (pacman for manjaro which is based on arch) but I haven't gotten the…
Notemaster
  • 465
  • 1
  • 3
  • 15
17
votes
5 answers

Library include paths with same header name

What is the best method to include a file that has same name in another folder from additional include directories? Example: lib1/include/foo.h lib2/include/foo.h where both lib1/include and lib2/include are added in additional include…
Mircea Ispas
  • 20,260
  • 32
  • 123
  • 211
17
votes
8 answers

How to include file outside document root?

What I want do to is to include 'file1.php' from 'domain1' into 'file2.php' on 'domain2'. So what I figured I should do is something like this: file2.php require_once '/var/www/vhosts/domain1/httpdocs/file1.php'; But this won't work for reasons I…
Brayn
  • 1,766
  • 10
  • 27
  • 33
17
votes
3 answers

C++ include with full path

I find #include "../app/thing.h" very ugly and I would like to be able to import from the main root of my project, like this: #include (I know <> is generally used for external but I find it very cleaner) How can I…
valentin
  • 2,596
  • 6
  • 28
  • 48
17
votes
2 answers

Eclipse C++ including header file from my source folder

I'm pretty new to C++ and Eclipse in general so I apologise if I'm missing something fairly obvious. The problem I'm having is that I'm trying to include a header file in one of my source files but they're in different folders in my project…
Joseph Little
  • 921
  • 3
  • 13
  • 22
16
votes
6 answers

Php include not working? function not being included

Here is the full context of the situation: I recently got a new Mac, I'm a php developer so I downloaded MAMP and started developing. First I noticed that my includes were not being included, but I changed that by configuring my php.ini. However…
Tom
  • 515
  • 3
  • 7
  • 21
15
votes
5 answers

visual studio not seeing my include files

This may be a very simple question but I haven't been able to figure it out so any help is appreciated. I have a header that is located in a general folder because I want to use it in several projects for…
Diego Fernando Pava
  • 899
  • 3
  • 11
  • 24
14
votes
1 answer

How to configure Visual Studio Code includePath for Arduino and Teensy

I'm working with Arduino and Teensy boards from inside VS code. I can build and program everything fine, but the highlighting and code following functions built into VS Code don't work. Previously, my custom headers weren't loading or highlighting,…
Salvatore
  • 10,815
  • 4
  • 31
  • 69
14
votes
3 answers

Visual Studio Code: C++ include path

I'm currently using https://marketplace.visualstudio.com/items?itemName=mitaki28.vscode-clang which is great as a nice little tool for accessing member functions. I am however having one issue with a project I am importing. While the above clang…
Deftness
  • 265
  • 1
  • 4
  • 21
14
votes
1 answer

Check where include/library path variables like OpenCV_LIBS point to in unix

When using some libraries like OpenCV with C/C++, variables like OpenCV_LIBS are used to point the compiler/linker to the relevant directories. Examples using cmake: include_directories( ${OpenCV_INCLUDE_DIRS} ) target_link_libraries( project_name…
Mark
  • 173
  • 1
  • 2
  • 6
14
votes
8 answers

php relative and absolute paths

I have read that when including a php file that using absolute paths has a faster processing time than relative paths. What would you suggest to…
Lizard
  • 43,732
  • 39
  • 106
  • 167
1
2
3
59 60