HELP... again

my new error i must debug seems to be project related, but me, only getting into open gl a week ago, have no clue what to do, heres the error:
“preprocessor #error directive
excpt.h line 23 #error ERROR: Only Mac or
Win32 targets supported!”
please someone explain!!!

What plattform are you developing on and where does this error occure?


the error occurs somewhere in the “excpt.h” file, or so my compiler says, i doubt it though because it selects the line the error message. I am using a win32 console application.

try making a win32 app instead of a console app, or try including windows.h in your code.

I don’t think this is really an OpenGL related problem. Apparently in excpt.h there is probably code like so…

#if !defined(WIN32) && !defined(WHATEVER_IS_USED_TO_DETECT_MACS)
#error Tell the user he’s on an unsupported platform

What compiler are you using? Most Windows compilers should have WIN32 defined by default, but there are usually settings to not define those default defines, which you may have inadvertently set.

Just took a look at the excpt.h that comes with VC++. It’s got this

#if !defined(_WIN32) && !defined(_MAC)
#error ERROR: Only Mac or Win32 targets supported!

I also created a simple project, included that header, then went to project->settings->C/C+±>Preprocessor category drop down and then checked the “Undefine all symbols” box. When I tried to compile the app, I got the exact same error. I uncheck that, I don’t get that error.

well i’ll try but i’m using code warrior so i don’t know if that’ll work. Does any body else use code warrior?

If you can’t find anyplace in Code Warrior that “undefines all symbols” then before you included excpt.h just do…

#define _WIN32
#inlcude <excpt.h>

Or better yet take a look at your specific excpt.h and see what #defines it looks for.

well i got past that problem but now it says theres 100 errors within something called “limits” and i don’t even know what that is.

static const bool is_specialized = false; // hh 971227 completed class definition
static T min() MSIPL_THROW;
static T max() MSIPL_THROW;

well i got past that problem but now it says theres 100 errors within something called “limits” and i don’t even know what that is.

static T min() MSIPL_THROW;

This error is in a class called “numeric_limits” and it says a “,” is missing.

The last one by me is the right one. The one before was a mistake, stupid computer

I’ve just noticed something interesting, my compiler hates me. Ha, well not exactly, for some reason it won’t even display a “cout” function, it gets the same error. I guess something more serious is wrong with it.

well i fixed that, it was just me being stupid, but the previous errors still stand.

static T min() MSIPL_THROW;

about 100 times over, if anyone knows whats wrong, feel free to chime in.

yay, i solved the problem but now i have a new one, it says:

unidentified symbol: __imp__glLightfv@12

now, i am slightly confused, actually i am quite confused. I thought it would be missing some #includes but i don’t know which ones

Well… you have now finally gotten to an OpenGL problem. That appears to be a linker problem, which would simply mean you haven’t added the OpenGL library. I don’t know where you would find this in Code Warrior, but there should be somewhere where you setup project settings where you can add the library opengl32.lib. I’m also assuming that CodeWarrior does come with it’s own opengl library, otherwise you may have to find out how to create one compatible for it.

Hmm did you say if you were on mac or windows? I can;t remember anyway codewarior on the mac. You need to add all of your libs/resources etc to your project, just drag them in. Check in
MyApp->Settings->Access Paths that you have the correct ones for OpenGL/Headers and so on.

i have windows. I have now added the lib file but it says:

“Invalid object library”