include-path

Undefined reference errors when including Rcpp.h

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 09:23:19
问题 I am using 64bit Ubuntu, and I am trying to write C++. I discovered if I use #include <Rcpp.h> , I don't even need to call any functions in the R namespace, and I would already receive undefired reference errors: obj/x.o: In function `Rcpp::Rstreambuf<true>::xsputn(char const*, long)': /usr/local/lib/R/site-library/Rcpp/include/Rcpp/iostream/Rstreambuf.h:61: undefined reference to `Rprintf' obj/x.o: In function `Rcpp::Rstreambuf<false>::xsputn(char const*, long)': /usr/local/lib/R/site

Visual Studio 2008 oddity with C++ and header files

末鹿安然 提交于 2019-12-11 06:11:50
问题 I have a large C++ project within a Visual Studio 2008 solution file, and everything is compiling and building correctly. So far so good. However, it is unable to find any header files when I attempt to open them directly from the IDE's code viewer window, even though the folder locations of those header files are enumerated in the "Additional Include Paths" section of the Properties page. For example, this C++ code fragment builds successfully: #include "ctrl_word.h" #include "SwitchOBJ.h"

Is it prefered to use $_SERVER['DOCUMENT_ROOT'] in the website?

本小妞迷上赌 提交于 2019-12-11 04:58:44
问题 Do you think it is preferred to use $_SERVER['DOCUMENT_ROOT'] in website's include statements? Is it supported everywhere without any problem? 回答1: Many frameworks use dirname(__FILE__) to work out the application path based on a known file, usually the index.php In the Zend Framework, they use the following to define the application path, which is then used everywhere in the app: define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'); 回答2: I personally prefer relative

#include files not found in Apple Open Source software

£可爱£侵袭症+ 提交于 2019-12-11 03:46:00
问题 I'm trying to compile Apple's OpenSource software from https://www.opensource.apple.com/ on OS X 10.9.4. The project includes Xcode project files, but I'm getting some errors due to misplaced include paths. For example, when trying to compile SecurityTool-55115 from os-x-1092 (the latest release up there) on OS X 10.9.4 (the latest production release), I get errors like this: os-x-1092/SecurityTool-55115/cmsutil.c:44:10: fatal error: 'Security/SecCmsBase.h' file not found #include <Security

Visual Studio Express 2010, include path

試著忘記壹切 提交于 2019-12-11 03:25:41
问题 I have a solution with many many projects, I did not write this project but it's an open source project (mysql++) , I need to include an include path to all projects. I would like to just globally add this include path to the solution and have it cascade down to all the projects... is this possible? I dread thinking about having to do the same thing for each individual project. Thank you, Alessandro Ferrucci 回答1: Visual Studio lets you modify many projects at once. Simply click the first in

Is there any standard requirement for C++ #include lookup?

a 夏天 提交于 2019-12-10 23:09:49
问题 Recently I learned that gnu cpp and msvc cl treat #include files differently. The common behavior is to look inside the directory of next to the includ_ing_ file, and then iterate over the include path (which is obviously set using -I or /I compiler arguments.) But now I wonder: did I learn correctly, or is there actually a standard for the preprocessor, too? 回答1: According to the standard, both #include <...> and #include "..." shall search an implementation defined set of places. There is

required_once issue in Google API Client for PHP

拟墨画扇 提交于 2019-12-10 19:45:44
问题 I have been trying to import/include file in my php script file and somehow it is not working. I know this require_once question has been asked so many times [ 1. require_once with subfolders , 2. require_once() cant find the include path, 3. Using require_once for up directory not working] but none of them seemed to be working for me. Blow picture will explain what I am trying to do clearly: What I tried and errors: Attempt 1 require_once(__DIR__.'GoogleClientApi/src/Google/Service/Analytics

Cannot open include file :'stddef.h' No such file or directory found error when creating a sample Qt application

北慕城南 提交于 2019-12-10 18:29:12
问题 stddef.h file is there in installed Nokia Qt SDK include folder, but still I am getting compile error on running Qt Simulator. Any ideas? Thanks in advance! 回答1: This error message happened with me when I tried to compile for Windows with the VS2008 version of Qt, but Visual C++ 2008 was in fact not installed to my computer. (VS2010 was, but that didn't matter.) I have the following ideas for you: Try installing Visual C++ 2008 or Try using MinGW instead of VS2008 The Qt simulator itself is

gcc include order broken?

时间秒杀一切 提交于 2019-12-10 15:51:58
问题 I have encountered the strange problem, that linux c++ compiler includes the files from local directory instead of system directory. See the pre-compiler output with (-H) option. It can be seen that system file /usr/include/sched.h suddenly includes time.h header from local directory and not system one. I assume if include file is within <> brackets the system directories should looked up first, The relevant line from sched.h is:- #include <time.h> Compiler output with (-H) option:- .....

Including CSS in .php file

◇◆丶佛笑我妖孽 提交于 2019-12-10 12:27:38
问题 I am trying to include a css file to my .php file. Inside the .php file, I have; <?php Loads of code.. ?> I'm wanting it like this.. <?php <link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet"> Loads of code.. ?> But obviously that doesn't work. Is there any way I can do this? Thanks! 回答1: You can use echo .. <?php echo '<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">'; ?> 回答2: <link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet"> <?php