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
0answers
12 views

How do I get VS Code to interpret generated symbolic links in include statements?

I'm using Visual Studio Code and working on a fork of FreeBSD. It is standard in this code base to use include statements that take the form #include <machine/foo.h>, where machine is a symbolic ...
-1
votes
0answers
12 views

Including gurobi_c++.h in CLion on windows

I have Gurobi installed on my windows 10 system and also have obtained the license and successfully used that in PyCharm but in CLion, the gurobi_c++.h header file is not found and I can't go further ...
0
votes
1answer
34 views

laravel 5.8 blade include error for big file

In normal, I have a master file (amp-html project) localhost/windows 10/apache2.2/php7.2.2 in views root: master.blade.php <html> <header> @yield('meta') </header&...
0
votes
2answers
53 views

Using WebForms via C# how do I initialize/create variables that are used throughout my application?

I'm still working on my transition from traditional .asp to ASP.NET (C# Webforms). In traditional .asp I could create config.asp. Within this file, I could initialize certain variables. For example if ...
0
votes
0answers
23 views

How to use OpenCV libraries in Visual Studio Code

i'm new with VS code and i'm experiencing problems with external libraries. #include <iostream> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; int main(){ ...
0
votes
4answers
64 views

Batch rename of files including complete parent directory structure

I have quite an extensive folder structure with only one file in the deepest/last folder. File name: model.cgf What I want is to have a command-line batch-file that renames all files, renaming them ...
0
votes
0answers
59 views

Swig , C++ “include nested too deeply”

I am a beginner at c++ and I'm having this problem with nested include files. The code is too big to put here, but this is the part that I'm getting the error: cvblob.h #ifdef SWIG %module cvblob %{ ...
-2
votes
0answers
26 views

undefined reference in c++ while using header file [duplicate]

I have three files main.cpp hello.cpp and hello.h all in the same directory when main.cpp tries to call the Hello() function from hello.cpp i get an error undefined reference to Hello() I've tried to ...
0
votes
0answers
21 views

C# class library with extra files

I have a C# class library containing simple classes with Data Annotations that define a JSON Schema. It seems easy enough to generate the JSON Schema files however I'd like to supply the resulting ...
0
votes
1answer
24 views

What is the default privacy/scope setting for include_directories?

I understand that target_include_directories() can be used in conjunction with PUBLIC, INTERFACE, or PRIVATE to specify the scope or privacy of the directories. But a lot of antiquated code still uses ...
0
votes
0answers
25 views

C++: Check / Assert a defined constant at its redefinition

I am currently trying to use two headers defining (partially) the same constants. Typically the constants should be the same but my plan is to add a check to be absolutely sure. The problem can be ...
0
votes
0answers
17 views

Error with two types that have the same simple name in a model

I have a 'model' (a DbContext derived class) that has the following entity sets: public partial class LabModelContainer : BaseContext<LabModelContainer>, ILabModelContainer { public ...
1
vote
0answers
27 views

QMake / Moc behave differently when MOD_DIR is set

I'm now working on a project that causes me headache. I use some piece of code provided by a third party in which at one point, a MOC file is included at the end of a cpp file. Let's call those files ...
-1
votes
2answers
37 views

can sessions take part in the include function? [closed]

I got 3 files: index.php / header.php and footer.php I want the session go ahead of header.php index.php <?php include("header.php"); ?> // Some Data inside index.php <?php include("footer....
-1
votes
1answer
28 views

How to make sure JS file runs in external php without including again?

I have a PHP script that includes a .JS file. The PHP file makes a jquery call to an external functions.php file which requires the same .JS file, however, with it being a separate file, I have to ...
0
votes
1answer
30 views

reading value from one JSP page in another giving null value

I need to try and read a value from one JSP file in another. I came across a forum while searching or an answer and found that if I declare a variable in one file and include that JSP file in the new ...
-1
votes
0answers
24 views

How to include php path of images in Wordpress Shortcode with return?

I'm building a wp plugin and would like to use a shortcode to display the given content. So far so good. However, I'm trying to include the DIR of my images in PHP inside the shortcode. I'm not sure ...
-1
votes
0answers
26 views

How to install custom C header files for Xcode

Unable to use #include for custom header files for C in Xcode. I have been given header files for a university assignment that I need to use but don't know how to install them or at least point Xcode ...
0
votes
1answer
13 views

my basic w3.includeHTML() includes nothing in a basic test executed on my PC server

In debug, the include created about 30 temporary file named VMnnnn where n is an integer. Each file contains the single letter "z". None of the text to be included is there. I created an html ...
-2
votes
1answer
76 views

Can't include <QtWidgets>

I'm trying to link Qt5 in Visual Studio 15 2017. I have added the paths and file references for additional (1) include directories, (2) library directories and (3) dependencies in the Property Pages. ...
1
vote
1answer
36 views

How to include h/hpp header files in CMakeLists.txt instead of cpp or other hpp files

I'm wondering if it's possible to include header files directly in CMakeLists.txt, instead of cpp or hpp files. I'm working on a project, which all cpp files need to include some hpp files. I can add ...
0
votes
0answers
45 views

App crashes with a include tag in the phone

I have included a layout to the activity_main but everytime i try to run the app it crashes. I used several phone but the result is same. I tried by including a different layout it works fine. I am ...
-1
votes
2answers
57 views

How to include a json file into another json file?

I'm working with json files and I need to include a json file into an other one. These are my code and expected reuslt : file1.json { "object" : { "name" : "society", "type" : "string",...
1
vote
1answer
31 views

Unable to find sys/fdio.h (floppy disk control operations) on Solaris machine 5.11

I am compiling my application code on Solaris 5.11, Code is written in C.In the application code I used "fdio" related code. The Solaris box do not have that . How to get the sys/fdio package. #...
0
votes
1answer
18 views

including current date in printfile names

I am using a macro to obtain data from a website and save to a print file using the print function on the specific website page. In the print window i can select "print to pdf" but do not know how to ...
0
votes
2answers
37 views

Display content of text file inside Angular 7 web interface

I'm quite new to Angular (I'm using Angular 7) and trying to display a (ideally remote) file in some kind of box on my web interface. Previous posts suggest to use ng-include for that. But whenever I ...
0
votes
2answers
20 views

makefile can't find include file path even with -I flag

Compiling with Makefile tells me that it can't find path to some include files. Here's my directory layout: build (empty directory) include (directory) tpu_uarch (directory) buffer.hpp ...
0
votes
1answer
26 views

Wordpress enqueue_script does not work on tablet

I am using a 3rd party plugin in my site and the wp_enqueue_script working well on every device except android tablet. I have tested it with put an alert in the very first line of the file and it ...
0
votes
2answers
71 views

Unable to Include files containing variables in Ansible Playbook

My ansible playbook files is test.yml. In the same location i have three files having variables i.e app_base_vars.yaml, web_base_vars.yaml & web_bran_vars.yml Sample contents of one of the ...
-1
votes
0answers
42 views

variable from #included file does not get initialized correctly

I am including a 2-D map from a pair of header/source files. The variable does not get initialized correctly when I try to use them without copying the variable into the main function. How can I fix ...
1
vote
1answer
33 views

PHP not getting the vars of include relativetime.php file but all other $lang vars outside relativetime.php are just fine

I have 2 functions first to detect language and other to convert time into relative time index.php Is the file where i am calling the 2 functions with include_once include_once('./backend/...
-1
votes
0answers
11 views

PHP included file special characters problem utf-8 encoding [duplicate]

I did researches for this problem and I found the solution, let's say the right solution! In my case, I have an index.php that holds other pages depended from get parameter! index.php <?php ...
0
votes
0answers
26 views

How generate .php files that refer to the same head.php file?

Here is what I have so far file_put_contents('./'. $dir .'/'. file .'.php','<?php include "../head.php"; echo $head; ?>' . $body); I also tried file_put_contents('./'. $dir .'/'. file .'.php',...
1
vote
1answer
60 views

Including a perl file that is generated in current file

I am working on a perl script that successfully generates output files containing hashes. I want to use those hashes in my file. Is it possible to include a file that is generated in that file or will ...
-2
votes
3answers
1k views

C++ #include<XXX.h> equivalent of Python's import XXX as X

I work with Python most of the time, for some reasons now I also need to use C++. I find Python's import XXX as X very neat in the following way, for example: import numpy as np a = np.array([1,2,3])...
0
votes
1answer
43 views

how to reduce compile time: in case of including an untouched header file

I have a function defined in file1.h as below: /** file1.h **/ def testFunc(){} file1.h is written once and will not be modified during the development. But I have to use testFunc() in my code say ...
0
votes
1answer
50 views

c++ react to external #define

The glfw3-library can be made to include vulkan using a definition before the include: #define GLFW_INCLUDE_VULKAN #include <GLFW/glfw3.h> i want to do a similar thing, but for debug vs non-...
0
votes
0answers
8 views

Bringing valued from a dropdown cell in Excel throuthg vlookup or other solution

I need to bring the value (provider specialty) for a specific doctor ID from a different document where that value is stored in a drop-down cell with different values (PCP, Specialist, both). The ...
0
votes
0answers
48 views

C++ project Configuration and Linking programmatically

I have a project in C++ and we are a team using Visual Studio. The project uses many (really many!) external libraries (boost, armadillo, quantlib, etc). I am trying to find a way to do the path ...
1
vote
1answer
46 views

Are there any practical reasons to use `-include` in a Makefile?

I was recently debugging a vague problem which turned out to be caused by a misplaced sub-Makefile which was conditionally included into a main Makefile by the -include directive. Mind the starting ...
0
votes
1answer
65 views

why do i constantly have an error in compilation: include nested too deeply c++

whenever i try to build my code, the compiler show this error: include nested too deeply error c++, and when i try to click Abort compilation .. a page with a cctype code is opened. i'm using dev ...
1
vote
0answers
39 views

Use class object with include file

I have 4 files; myclass.php, header.php, index.php and footer.php Inside myclass.php i have the follow code: class MyClass{ public function someFunction(){ return "OK"; } } In header.php have the ...
0
votes
1answer
92 views

How to use preprocessor directives to include file twice with different code?

I am trying to make a C++/CLI wrapper for my native C++ project so that I can use it in C#. So far I've wrapped the classes and functions that I need, but I've been trying to find a way to do the same ...
0
votes
2answers
44 views

Twig posting empty modules on page

I'm working with Twig in Craft and am trying to include a module I've made, I have added all the content into the modules in the CMS and saved it, they show on the page correctly, but a tonne of empty ...
0
votes
1answer
29 views

Including Requested File, Rewriting Url, Managing 404 Error in PHP

Please read the all. I know it is long but I really need help. What I am trying to do is including the requested file in the "main-container", then rewrite the requested url, if it does not exists, ...
0
votes
0answers
19 views

w3-Schools Include html n

I've used W3's include HTML before. In fact, my code worked yesterday.... which is why this is maddening that its not working now! I've reinstalled the code from their website, and stil nothing works....
0
votes
0answers
15 views

How to export library module, in-depended on common module version (or import lib and resolve its dependencies to already installed version)

I have several modules, (npm packages) using two common libraries. ModulA includes LibraryA and LibraryB, but LibraryB also includes LibraryA. ModulA - LibraryA.v0.1 - LibraryB.v0.1 - ...
0
votes
1answer
22 views

Conditional inclusion of sub-Makefiles based on ifeq test

Is there a way to conditionally include a sub-Makefile based on the result of a an ifeq test as suggested below CC = g++ CENTOS_VERSION := $(shell rpm -E %{rhel}) TARGET = main $(TARGET): $(...
0
votes
1answer
27 views

Makefile will not set the include directory for opencv4

i have a problem with my makefile. It will not set the opencv include directory. Makefile: # Basic Vars VERSION = 0.01 BIN = ./bin64/ SOURCE = ../native/ # DC Lib files OBJ = $(addprefix $(BIN), ...
3
votes
0answers
28 views

How to let KDevelop format source code in a “tpp” file in a way same as in a “cpp” file?

I'm using KDevelop 5.2, and have source files of three kinds: hpp/cpp/tpp. Because there are many inline functions crossing invokes each other, I have to put inline codes into few of separate files ...