Jump to content
  • Advertisement


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


About compiler flags

This topic is 6178 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 all, I am a beginner of 3D graphics, now I want to generate the opengl using c++. But it tells me to set up the compiler flags in order to draw the geometries or execute the behaviors. So what does it mean, and how can I set up? Such as SUPPORT_OPENGL, SUPPORT_JPEG... Thank you very much! Siu

Share this post

Link to post
Share on other sites
Do you have the exact error messages ?
Are they compile-time ? run-time ?
What compiler are you using ? CL (visual studio) ? g++ ?

Are you trying to compile the library ?


Share this post

Link to post
Share on other sites
Hi, Thank you for your reply.
Actually, I am following the work to do in the site:
Those source code is free, but I found that I don''t understand what''s means by compiler flag-SUPPORT_OPENGL, SUPPORT_JPEG.
The page stated that the requirement for using such flags needs "OpenGL 1.1 library" and "Independent JPEG Group''s library", so I don''t understand it and apply it.

The errors are compile time error, and says it cannot find xxx.lib, I''m using VC++6.
Thank you very much.


Share this post

Link to post
Share on other sites

What is going on is that the library you are compiling has conditional compilation statements that you have to activate if your system supports such or such functionality.

For example, if you have installed libpng/zlib, you may set the corresponding flag SUPPORT_PNG (I''ll come to that later) and the appropriate code will be included in the library to uses it.

These compilation flags are the equivalent of #define instruction in the code (and are checked with #ifdef and the like ). In VC6, you access them in Project-Settings-C/C++-Preprocessor definitions. Depending on what you have installed, add SUPPORT_whatever... or not.

Unfortunately, from what I pick up on that web page ( specifically, the use of flex and bison ) building the library may be restricted to GNU platforms (e.g. on windows : cygwin, MinGW). I do not see any hints that you can build it with VC6 in the source code itself (usually, you are provided with a project file or a makefile...). Though I may be wrong.

So try again without defining the flags for the components you do not have. I can''t do much more for you.

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!