Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify include directory for configure script

Tags:

I have a linux system at my workplace with pretty old packages and no root access. I'm compiling packages that I need from source with --prefix=[somewhere in homedir]. My problem is that I just can't find out how to convince configure to look for header files in a specific directory. The source is cpp. I tried with environment variables related to g++ and looking up flags and googling but I had no success. Can someone help me solve this?

like image 768
jakab922 Avatar asked Oct 18 '10 12:10

jakab922


People also ask

How do I add additional directories in Visual Studio 2017?

Adding The Include DirectoryGo to the Visual Studio Project Property Pages dialog (From the Project menu, select Properties, or right-click on the project in the Solution Explorer). Select Configuration Properties, C/C++, General, and then add $(PIXELINK_SDK_ROOT)\include to the Additional Include Directories field.

Do header files need to be in the same directory?

No. Usually you give the compiler (or, more specifically, the preprocessor) a bunch of include directories, to tell it where to look for header files. This is typically done from the Makefile (or from the project settings when building inside an IDE).


1 Answers

Usually you can pass additional compiler flags inside CXXFLAGS. For gcc you can specify more include directories with -I/some/dir, e.g.

$ ./configure CXXFLAGS="-I/some/dir/" 

where /some/dir/ contains your headers.

like image 83
Benjamin Bannier Avatar answered Oct 18 '22 13:10

Benjamin Bannier