Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Rob Smith

C++ preprocessor question

This topic is 5479 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

Is there a way to add a command to the pre-processor. specifically to VC? like add "#something" or some other way it can do work on at compile time. I know i could batch run the source through a program which did the work first and then compile the generated code, but i would prefer this to be in place.

Share this post


Link to post
Share on other sites
Advertisement
Is there a way to add a command to the pre-processor. specifically to VC? like add "#something" or some other way it can do work on at compile time.

No.

I know i could batch run the source through a program which did the work first and then compile the generated code, but i would prefer this to be in place.

That''s what a preprocessor is.

Share this post


Link to post
Share on other sites
quote:
Original post by Tiffany
I think he was trying to get it to work within the current preprocessor... not completely generate a new one.

Correct.

quote:
Original post by Sneftel
Check out boost:: preprocessor. Not quite what you're asking, but it may be what you want.

Thanks though.

quote:
Original post by C-Junkie
No, you can't add your own #directives.

what are you trying to do?

specifically I would like to have "#crc DEFINE Text" which could work like a define and replace itself in code, but instead of doing a straight replace, crc the string and dump that value in.

edit: typo

[edited by - Rob Smith on December 15, 2003 6:49:19 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!