Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Preprocessor symbols
Preprocessor symbols [message #88155] Sun, 30 November 2003 17:43 Go to next message
Eclipse UserFriend
Originally posted by: sasschgmxnet.yahoo.de

Hi!
Being new to eclipse I thought when defining preprocessor symbols on a per
project basis (i.e. via Project->Properties->Paths and Symbols) I could
refer to them in source with #ifdef, #ifndef etc...
However: my g++ preprocessor seems not to recognize those definitions, so
I have to define them explicitly - eg. with #define DEBUG.

Can anyone out there confirm, that per project symbol definitions work in
cdt 2.0.0?

OS: linux w/ Sun Java VM
eclipse: 3.0.0 (Build:200311211012)
cdt: 2.0.0

thx,
Sascha

--
Sascha Schwarz Please followup to the group.
Darmstadt/Germany
Re: Preprocessor symbols [message #88183 is a reply to message #88155] Sun, 30 November 2003 19:36 Go to previous messageGo to next message
Eclipse UserFriend
What project type do you mean? Managed or Standard Make?

In managed build, the preprocessor defines should be picked up.

In standard make, you have to write a makefile and define your symbols there.
BTW: in _standard make_ the properties in the project are actually definitions
for the CDT parser/indexer facility. They are not to be mistaken to be send to
the compiler.

Sascha Schwarz schrieb:
> Hi!
> Being new to eclipse I thought when defining preprocessor symbols on a per
> project basis (i.e. via Project->Properties->Paths and Symbols) I could
> refer to them in source with #ifdef, #ifndef etc...
> However: my g++ preprocessor seems not to recognize those definitions, so
> I have to define them explicitly - eg. with #define DEBUG.
>
> Can anyone out there confirm, that per project symbol definitions work in
> cdt 2.0.0?
>
> OS: linux w/ Sun Java VM
> eclipse: 3.0.0 (Build:200311211012)
> cdt: 2.0.0
>
> thx,
> Sascha
>
> --
> Sascha Schwarz Please followup to the group.
> Darmstadt/Germany
>
>
Re: Preprocessor symbols [message #88194 is a reply to message #88183] Sun, 30 November 2003 19:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sasschgmxnet.yahoo.de

Henning Riedel wrote:

> What project type do you mean? Managed or Standard Make?

I was referring to std.

> In managed build, the preprocessor defines should be picked up.

Yes they are.

> BTW: in _standard make_ the properties in the project are actually
definitions
> for the CDT parser/indexer facility. They are not to be mistaken to be send
to the compiler.

This is exactly what I got wrong.

Dankeschoen, ;)
Sascha

--
Sascha Schwarz Please followup to the group.
Darmstadt/Germany
Re: Preprocessor symbols [message #88237 is a reply to message #88183] Mon, 01 December 2003 05:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thomas.graphikon.de

sorry for asking the same question again, but a few days ago i get no
answer and this discussion gets in the direction of my problem.

im using a standard make project and add MY_API to "Defined Symbols" in
the Project Properties.

if i open a file with this class declaration:

class MY_API MyClass : public YourClass{
...
};

the outline view (and project view) did not recognize MyClass as a class
declaration (they ignore it completly).

if i add the line

#define MY_API

to the file, everything is ok and i can browse the class MyClass in the
outline view.

so do i something wrong or does the outline view not use the defined
symbols for parsing.

thanks
thomas

Henning Riedel wrote:

> What project type do you mean? Managed or Standard Make?

> In managed build, the preprocessor defines should be picked up.

> In standard make, you have to write a makefile and define your symbols there.
> BTW: in _standard make_ the properties in the project are actually
definitions
> for the CDT parser/indexer facility. They are not to be mistaken to be send
to
> the compiler.

> Sascha Schwarz schrieb:
> > Hi!
> > Being new to eclipse I thought when defining preprocessor symbols on a per
> > project basis (i.e. via Project->Properties->Paths and Symbols) I could
> > refer to them in source with #ifdef, #ifndef etc...
> > However: my g++ preprocessor seems not to recognize those definitions, so
> > I have to define them explicitly - eg. with #define DEBUG.
> >
> > Can anyone out there confirm, that per project symbol definitions work in
> > cdt 2.0.0?
> >
> > OS: linux w/ Sun Java VM
> > eclipse: 3.0.0 (Build:200311211012)
> > cdt: 2.0.0
> >
> > thx,
> > Sascha
> >
> > --
> > Sascha Schwarz Please followup to the group.
> > Darmstadt/Germany
> >
> >
Re: Preprocessor symbols [message #89009 is a reply to message #88237] Thu, 11 December 2003 11:39 Go to previous message
Eclipse UserFriend
the outline view does not use the values specified in the project
properties. this is a bug and we shall hope to fix it soon.

In article <bqf6f4$rdv$1@eclipse.org>, thomas@graphikon.de says...
> sorry for asking the same question again, but a few days ago i get no
> answer and this discussion gets in the direction of my problem.
>
> im using a standard make project and add MY_API to "Defined Symbols" in
> the Project Properties.
>
> if i open a file with this class declaration:
>
> class MY_API MyClass : public YourClass{
> ..
> };
>
> the outline view (and project view) did not recognize MyClass as a class
> declaration (they ignore it completly).
>
> if i add the line
>
> #define MY_API
>
> to the file, everything is ok and i can browse the class MyClass in the
> outline view.
>
> so do i something wrong or does the outline view not use the defined
> symbols for parsing.
>
> thanks
> thomas
>
> Henning Riedel wrote:
>
> > What project type do you mean? Managed or Standard Make?
>
> > In managed build, the preprocessor defines should be picked up.
>
> > In standard make, you have to write a makefile and define your symbols there.
> > BTW: in _standard make_ the properties in the project are actually
> definitions
> > for the CDT parser/indexer facility. They are not to be mistaken to be send
> to
> > the compiler.
>
> > Sascha Schwarz schrieb:
> > > Hi!
> > > Being new to eclipse I thought when defining preprocessor symbols on a per
> > > project basis (i.e. via Project->Properties->Paths and Symbols) I could
> > > refer to them in source with #ifdef, #ifndef etc...
> > > However: my g++ preprocessor seems not to recognize those definitions, so
> > > I have to define them explicitly - eg. with #define DEBUG.
> > >
> > > Can anyone out there confirm, that per project symbol definitions work in
Previous Topic:Trying to run Hello World Tutorial
Next Topic:Debug template members
Goto Forum:
  


Current Time: Thu May 01 16:49:00 EDT 2025

Powered by FUDForum. Page generated in 0.03401 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top