Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Can't Get Include Paths to Work in CDT
Can't Get Include Paths to Work in CDT [message #1098822] Sat, 31 August 2013 15:01 Go to next message
Paul Wilkinson is currently offline Paul Wilkinson
Messages: 1
Registered: August 2013
Junior Member
I am trying to add the b2dJson library to an existing Android project. I have verified that the correct include folder (/Users/paul/projects/RacerX/thirdparty/b2djson) is in my Properties/Paths and Symbols/Includes/GNU C++.

The include like looks like:
#include <b2dJson.h>

The folder with the include file:

Pauls-Mac-mini:b2djson paul$ pwd
Pauls-Mac-mini:b2djson paul$ ls
b2dJson.cpp b2dJsonImage.h bitmap.h
b2dJson.h b2dJsonImage_OpenGL.cpp json
b2dJsonImage.cpp b2dJsonImage_OpenGL.h jsoncpp.cpp

One thought is that maybe GNU C++ is on the correct choice for Android? But the other folders listed here seem to work properly.
Re: Can't Get Include Paths to Work in CDT [message #1103475 is a reply to message #1098822] Fri, 06 September 2013 17:05 Go to previous message
CGO SenseiC is currently offline CGO SenseiC
Messages: 16
Registered: July 2011
Junior Member
Change the include to "b2dJson.h". Using the less than and greater than tells the preprocessor to look in the implementation-specific locations for the file;

"ISO Standards - C Language - Sec. 6.10.2 Source file inclusion
2. A preprocessing directive of the form
# include <h-char-sequence> new-line
searches a sequence of implementation-defined places for a header identified uniquely by the specified sequence between the < and > delimiters, and causes the replacement of that directive by the entire contents of the header.

When you want to include your own header, you must use the double quotes. Next time type the #include " then hold down CTRL and press the space key. This will use the code-completion feature which in the case of a #include directive will present you a list of all the header files the compiler can find using the particular directive form (double quote versus brackets). Hope that helps.

SenseiC bows out.
Previous Topic:Adding project reference programmatically.
Next Topic:Can't get Eclipse Linuxtools call graph to display
Goto Forum:

Current Time: Tue Jul 22 09:34:33 EDT 2014

Powered by FUDForum. Page generated in 0.01600 seconds