Jump to content
  • Advertisement
Sign in to follow this  
atw208

Java: getting Eclipse to work with preprocessor

This topic is 5095 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This kind of preprocessor: #ifdef #define something #endif Eclipse has those wiggly red lines over those kinds of lines. How do I keep Eclipse from doing that while checking other syntax errors like misspelled variables? I'm willing to use a preprocessor that can have it's directives placed inside some form of Java comment, if one is available. I'm also willing to switch to another full featured editor (preferrably free). So... what should I do? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Hey,

This sounds like a job for Antenna.

The preprocessor that comes with antenna doesnt integrate with Eclipse but allows you to hide your preprocessor directives behind the comments


//#ifdef DEBUG
System.out.println("this will only be displayed if DEBUG is defined!");
//#endif



Ontop of needing antenna you will also need ant. Remember the preprocessor doesnt integrate into eclipse, but the nice comments allow for the IDE to skip over them and just read them as comments.

Share this post


Link to post
Share on other sites
Quote:
Original post by kooktroop
This sounds like a job for Antenna.


I'm curious on how you're setting up Eclipse. Are you using Antenna to do the entire build process thus removing Eclipse's builder, or are you using the preprocessor with Eclipse's builder?

Share this post


Link to post
Share on other sites
Quote:
Original post by kooktroop
Ontop of needing antenna you will also need ant.

Ant is already intergrated into Eclipse in any of the standard Eclipse builds. [grin]

Share this post


Link to post
Share on other sites
I dont use ANT with Eclipse but thats because i use some of the ant tasks that arent supported by eclipse (at least the version i have). I'm sure if i spent the time i could set it up to work but ive got other things to do.

At the moment i just run ant from the command line. I find it better this way anyhow. All i have to do is type ant and press enter, rather than a series of clicks with the mouse.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!