View Full Version : Mac/Windows
09-08-2000, 02:34 AM
I have opengl code from windows c++. It uses all the BOOL, RECT, POINT etc. which are all from windows.h. But when compiling on the mac (codewarrior) windows.h goes to macwindows.h and this doesn't support any of these types.
What should I be doing, or just re-typedef them.?
09-08-2000, 10:33 AM
The MacOS equivilants to the variable types are as follows:
BOOL - Boolean
RECT - Rect
POINT - Point
I can't remember exactly how things are stored in POINTs and RECTs under Windows. Hope that helps, you should be able to just do a find & replace unless you are trying to keep it cross platform compatible still, then you should maybe think about define your own data structures for them which will work correctly.
09-08-2000, 10:49 AM
Yeah they are in windef.h, but there are loadsa undefined errors, so I assume there are headers missing.
macwindows.h doesn't seem to do the same as windows.h like I assumed it should.
MacWindows.h has nothing to do with windows.h.
Bool is a standard C++ type, but use Boolean instead. Point and Rect are probably in MacTypes.h, and you should drag the InterfaceLib stub library into your project.
If you are using Codewarrior, start with any of the sample mac projects in its folder.
09-09-2000, 07:54 AM
Well interfacelig stub is in the project. And well the mac version of windows.h includes macwindows.h
so I assumed that that was the mac version of windows.h for windows. They are in mactypes.h but windows uses RECT where as mac uses Rect and so on. I just thought it strabge that there was no header that would do all the re-typedef'ing when going from windows to mac....
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.