Jump to content
  • Advertisement

Archived

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

aboeing

pragma compiler options for VC6

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

Hi, I cant seem to find any pragmas for general compiler options. Specifically I want to set the option "Zi" for debug mode (in the source file). (default is ZI - "Program Database for Edit and Continue) (need to do this for the stringizing bug) Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I can''t seem to find any either but I have to ask...

Have you looked at Set Compiler Options in the MSDN?

What advantage can you get from #pragma that you can''t achieve through the Project Settings dialog box or better yet through the use of the CL Environment Variable ?

Share this post


Link to post
Share on other sites
Agreed. Don''t try to do everything through pragmas. Not only is it ugly, it''s impossible (because with very few exceptions, pragmas can''t be passed to the linker).


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


Link to post
Share on other sites
Basically its because I''m lazy. I dont want to have to set this option for every project I make, (a lot of them), so I would like to be able to set it from a "configuration.h" file.
MSVC supports giving the linker any option you want with a
#pragma comment(linker, WHATEVER)
so you can pritty much set up all the project settings by including one file - a definate bonus if your working with a large number of projects.
For linux its not so much a problem as you generally use a makefile anyway.
And I would prefer to use the IDE, if possible, to compile things and its just annoying to have to set this one option every time.

My configuration of VC (which I assume is the default) does not set /ZI in vcvars32.bat or by default, so its not really a problem on the command line.

Or does setting the CL environment variable alter the behaviour of the IDE''s project settings aswell?

Share this post


Link to post
Share on other sites
You can use makefiles with VC6 as well.

In VC7, project files are XML files, which makes incorporating default settings very easy.


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


Link to post
Share on other sites
yeah I know, I just wanted to make it easy for other people making projects, who generally dont know anything about compilers,linkers and makefiles. (mass generalization: linux users are smart enough to write their own make files, windows users arn''t)

I guess there isn''t really any other option though.
Thanks anyway.

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.

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!