Questions tagged [include]

A provision that many programming languages provide to allow functionality defined in one file to be used in another.

Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

Rust Bindgen: Setting include path on windows

I'm new to Rust development under Windows. I'm trying to bindgen a library, libk4a, on both windows and linux.On linux it is installed as libk4a, under the usual places, /usr/local/include/k4a/k4a.h ...
0
votes
0answers
5 views

Include/headers for shared library with Bazel at Tensorflow

To build a shared library of tf-lite I used bazel build //tensorflow/lite:libtensorflowlite.so the library is produced within bazel-bin/tensorflow but headers should be produced in bazel-genfiles ...
0
votes
0answers
15 views

Populating an array with include directives

This morning I learned that the famous videogame Super Mario 64 has been fully decompiled back to C source code. Just out of curiosity, I've decided to look through it, and I noticed something that I ...
0
votes
0answers
15 views

Fix CMakeLists.txt to include other header files

Im trying to start a idf-esp32 example with eclipse. While eclipse builds the program i have problem with indexing so i tha includes in my main.c file cannot be resolved. As you see from picture i ...
0
votes
0answers
25 views

Why is my <footer></footer> not appearing in PHP using include function? [duplicate]

I have been using this index.php format: <?php //this is to include the header require 'includes/header.php'; //this is to include the content menu include 'includes/content.php'; ?> <?...
-1
votes
1answer
35 views

Return a string if a substring is known

I want to iterate through an object with object keys. With a single input (substring) from a user, I want to get the whole string to do the iteration. My object: const obj = { "I am string": "...
0
votes
0answers
25 views

Relative header dependencies in Bazel

I'm having trouble accessing headers from different directories in Bazel, relative to the workspace root. Here's a simplified representation of my projects file structure: . ├── util │ └── BUILD │ ...
0
votes
1answer
29 views

Class not found in usual file but it's aliased

I do this: $model = new Model(); in functions.php file and php says that this class not found, but I have typed this: class_alias("core\Model", "Model"), and it works in view files and index....
0
votes
0answers
17 views

Modern CMake target_include_directories include alias for

Here is an example of project structure : CMakeLists.txt A/ includes/a.h src/a.cpp CMakeLists.txt B/ includes/b.h src/b.cpp CMakeLists.txt And here is a sumup of my CMake ...
0
votes
1answer
13 views

Jekyll includes escapes closing tags?

So I have a site with the following basic structure: <body> <section> <p>Text of Section 1</p> </section> <section> <p>Text of Section 2</p&...
1
vote
0answers
52 views

Separating common code and placing common headers

I found two contradicting answers how to handle common includes(one, two), so I decided to describe my case... I have a small project, which originally contains 4 small apps. Assume that I have files ...
0
votes
1answer
33 views

Any way to include the same php file twice?

Any way to include to multiply PHP files that contain some of the same code without getting the error: Fatal error: Cannot redeclare Feed() (previously declared in ... I have one php file XML ...
-1
votes
0answers
23 views

Laravel @include of file I made is not working?

I made a folder inside views for dashboard then made file called _sessions.blade.php when I include this file in my app.blade.php it is not working and just delete page content @include('...
0
votes
0answers
21 views

glad.h suddenly cannot be found after including another file whien having 2 other includes of glad.h in the project

I am writing a game engine in C++ and currently I'm writing an OpenGL renderer using glad. I merged in my previous openGL project succesfully, but in a bit of a placeholder-y way, so rendering is not ...
-2
votes
1answer
20 views

Does PHP eval() work similarly to including? (load page with code in DB)

If someone uses eval() in PHP, does this method behave exactly like including the code which is in the string, except the error raised when there is a parse error? I am aware of security issues, this ...
0
votes
1answer
17 views

How can i Include a php file in a directory which contain include('xyz.php'); from another directory?

My directory listing is: Users>Images>PreDefines Where i am creating a php file i.e. index.php in PreDefines Folder. I want to include a php file from Users Folder i.e include('header.php');. ...
0
votes
0answers
14 views

JDK Include folder not found (python jep installation)

When trying to install JEP (Java Embedded Python) on my Linux Mint System using "pip install jep" i get the error Message Error: Include folder should be at '/usr/local/java/include' but ...
0
votes
1answer
33 views

While I'm including files by Class in php, file doesn't see any variables - like they don't exists

I have created class for "creating" widgets. You call static function, pass variables and have your sweet widget. For now it worked because I have been using variables created in widget file. But ...
1
vote
0answers
19 views

Do import libs and include files have 32bit and 64bit versions?

I know an 64 bit application cannot load 32bit dlls, but when I compile the application, should I use a 64bit version of include file and a 64 bit version of lib to link? Specifically, if I build a ...
0
votes
0answers
25 views

PHP: “No such file or directory” but file exists

Im trying to include a left hand side menu and im using... <?php include "/public_html/includes/includes-clients/menu.php" ?> to include it and i get the whole "No such file or directory" ...
0
votes
1answer
51 views

C++ cannot open source file “opencv2/tracking.hpp”

I am trying to use OpenCV multi-tracker, but it doesn't find tracking.hpp. I have built OpenCV with OpenCV-contrib modules based on these instructions. Now in Visual Studio, I have done this: where $...
1
vote
0answers
41 views

How do I include another file in an assembly file?

I work with x86-64 Architecture and would like to include a separate file into an assembly (.S) file. The separate file contains a table tab: .quad 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, ... and the ...
1
vote
1answer
39 views

How to include multiple files in a git repo config?

I want to include multiple config files in a Git repo config. However, when I run multiple commands like git config include.path /path/to/config/file only the last path is saved in the config. Does ...
3
votes
2answers
66 views

What prevents me from including a class in Ruby?

I'm trying to understand some Ruby internals: Attempting to include a class instead of a module, results in a TypeError: (that's by design) class C end class Foo end Foo.include(C) #=> ...
0
votes
1answer
41 views

Explanation for implementation of C/C++ nested `#include “Header”` grammar by lex/flex?

I'm study the Start States and Nested Input Files in lex/flex. In book flex and bison, I'm confused about the example implementation of C/C++ #include "Header" grammar: Here's part of example lex: /...
0
votes
1answer
23 views

Tabbed components in React.js HTML include

I am just currently learning React.js and I am trying to work on a simple project that can have some really heavy body content but I have to keep them in one page, so I chose tabbed components as a ...
2
votes
0answers
23 views

vs code C++ include list of paths

I am using C++ in vs code and would like to automatically pull in changing external include paths that for clang to find. Currently I have to edit the c_cpp_properties.json file as so: { "...
3
votes
0answers
27 views

Disable javascript function “add class on scroll” on subsite with php included header

I'm trying to disable a JavaScript function on certain subsites that change navigation background and text-color on the scroll. It's defined in the header.php which is included in all sites, but at ...
0
votes
1answer
77 views

How can the STL headers be found from inside a C++ program?

I'm coding a script to recursively document all the #include directives inside a .c, .cpp, .h, or .hpp file. However, I need to be able to locate the folder where the STL headers are located from ...
0
votes
0answers
18 views

How does Java/JVM handle cycle import? [duplicate]

C/C++ will generate an cycle include error if headers are included circularly. Python will generate an cycle import error if imports are circular. Since Java/JVM never generate this kind of errors, ...
0
votes
2answers
20 views

Include 'count.html.php'

This book 'php and mysql novice to ninja' said that to include the files count.html and count.php, I must type the following into the bottom of the count.php file: include 'count.html.php'; However, ...
0
votes
1answer
25 views

Do I really need to specify install-interface includes dependencies?

In a package of mine, I currently have: include(GNUInstallDirs) target_include_directories( mylib PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<...
0
votes
0answers
26 views

Properly including math.js library in a .js file

I want to use the math.js library in my javascript file - say it's called webpage.js. What I did so far is having a script tag in the main html file that calls math.js, and then another that calls ...
0
votes
1answer
12 views

Include file containing Constant Buffers - what about the registers?

in hlsl, we can use #include "somefile" just like in C. I would like to declare my Constant Buffers only once and include them in multiple shaders. But what about the registers? In some files a ...
-1
votes
0answers
19 views

Can I Use Include or Requre Function Before header() or setcookie() Function in PHP?

When I write a PHP code, it run successfully on localhost, but when I try to run it on actual server, the code could not run! After a little dig i found that, the problems are creating with the header(...
-1
votes
1answer
48 views

Visual Studio C++ cannot find OpenCV-Contrib modules

I am trying to use OpenCV multi-target tracker, but cannot include the header files. I have built OpenCV with extra modules by providing the path to opencv_contrib-4.2.0\modules in ...
0
votes
1answer
20 views

PHP/ How to include php code when it's interact with other files

I wrote a code about stock management. I have the files: index.php database --> that contains all my code files When i'm running my code from localhost/Stock/database/test.php enter image ...
-4
votes
0answers
25 views

PHP / include / ajax / actions

Hi there! I wrote a code about stock management. I have the files: index.php database --> that contains all my code. It's 12files When i'm running my code from my main file that has actions ...
0
votes
1answer
33 views

Laravel @include view with variable from function

I got i variable $b from function public function hello() { $b = "bla bla bla "; return view('hello',compact('b')); } enter image description here if i open the view i can see the ...
0
votes
2answers
42 views

Easiest way to determine which file is included in C?

For instance, in #include <stdio.h> what's the easiest way to figure out the path to the included file? Edit: I'm using gcc 9.2.0 on Arch Linux.
1
vote
1answer
74 views

C++ Error: Expected Initializer before 'void' [closed]

I have created a short OpenGL program to draw various triangles on the screen, and it involves an include file called "Shapes.cpp". Here is it's contents: #include "Shapes.h" #include <GL/glx.h>...
-1
votes
1answer
37 views

Include cant find directory PHP

i make MVC application (Without frameworks). I try to include models from folder 'models' in controller, in folder controller. include("/models/tasks_model.php"); But i get error: Warning: include(...
0
votes
0answers
10 views

Xcode User Search Paths - Subfolders and path inclusion

I know some variants of this question have already been posted but I do not manage to find an answer for this specific one. Here is my C++ project configuration in Xcode (folders already included). ...
0
votes
1answer
30 views

Unable to get property 'indexOf' of undefined or null reference

Im working on a Test AB on Adobe Target. I have this code that works perfect on chrome but When i try it on Internet explorer I get an error. MY CODE: function hashHandler(eventData) { if (...
0
votes
0answers
26 views

Merge dynamic-generated .txt file in .ino file using #include

I'm doing a 'scheduling' program in Arduino, has to send many string commands according to time of the day. The way I use is - is to make a 'for' loop that runs over the needed times, and if the ...
0
votes
0answers
12 views

MySQLi connection to database as custom function in a separate PHP file [duplicate]

Having some issues with a piece of PHP code that I'm using to learn about it a little more. I have the following situation: conf.php file with database connection details <?php $dbhost = "...
-1
votes
1answer
24 views

How can I build a dynamic absolute path in PHP?

I've a web site made of some folders, one for each section (info, news, blog etc...). In each of these folders there is an index.php file that should load a layout (common to all). These are stored in ...
0
votes
0answers
23 views

Is it bad practice to put includes inside a header file? [duplicate]

For example, I am building an IRC Client for various IRC networks (freenode, twitch, etc...). I have a source file for various irc functions IRC_functions.c void *get_in_addr(struct sockaddr *sa) { ....
1
vote
1answer
46 views

Why can I not #include my class from another file in the same directory?

I have three files in the following structure - src/ - events - ... - Event.cpp - Event.h - EventPtr.h - ... The issue is that the #include Event.h inside EventPtr.h doesn't ...
0
votes
0answers
34 views

SAS code runs with 0 observations if called from %INCLUDE

I'd like to start by saying I'm no SAS wiz by no means. I inherited SAS code from a team that no longer exists which was written by people who no longer work here, so there is nobody around that would ...