User forums > Using Code::Blocks

Alternate Include Path (Global Variable in CodeBlocks)?

(1/1)

dominover:
I've set up CodeBlocks for FLTK.  If I set up the Global Variable Editor with the 'base' c:\fltk-1.3.2 it will look for the include directory in c:\fltk-1.3.2\include .  Same goes for the libs etc.

There is an alternative field for the include path below the 'base' field. Because FLTK does not have an 'include' directory I want the include directory to be the 'FL' directory.  So my include path should be
c:\fltk-1.3.2\FL.   But even if I place that directory in the include path field, codeblocks still doesn't seem to see it.

Is there any way to get this to work or is that not what this 'include' field is for?
The only way I can get this to work is to make my own include folder and dump all the FL contents in it.  But really, I shouldn't have to do that.

Thanks

ollydbg:

--- Quote from: dominover on July 02, 2013, 03:18:55 am ---I've set up CodeBlocks for FLTK.  If I set up the Global Variable Editor with the 'base' c:\fltk-1.3.2 it will look for the include directory in c:\fltk-1.3.2\include .  Same goes for the libs etc.

--- End quote ---
Correct.
In your case:

Base:
FLTK  ---> c:\fltk-1.3.2
include path (if your leave the "include" field empty in Global Variable Editor)
FLTK.include  ---> c:\fltk-1.3.2\include
lib path(if your leave the "lib" field empty in Global Variable Editor)
FLTK.lib ---> c:\fltk-1.3.2\lib




--- Quote ---There is an alternative field for the include path below the 'base' field. Because FLTK does not have an 'include' directory I want the include directory to be the 'FL' directory.  So my include path should be
c:\fltk-1.3.2\FL.   But even if I place that directory in the include path field, codeblocks still doesn't seem to see it.

Is there any way to get this to work or is that not what this 'include' field is for?
The only way I can get this to work is to make my own include folder and dump all the FL contents in it.  But really, I shouldn't have to do that.

Thanks

--- End quote ---
You have two ways:
In your Global Variable Editor, you can put: "$(#FLTK)\FL" (no double quotes) in the "include" field, then in your project build setting $(#FLTK.include) will becomes c:\fltk-1.3.2\FL

Another way:
Leave the "include" field empty, and use "$(#FLTK)\FL" in your project search paths.

For lib path, they are similar.

You can find more details in wiki page: Global compiler variables - CodeBlocks

Navigation

[0] Message Index

Go to full version