Unable to compile on OS X 10.2.6
by Steve Lamperti · in Torque Game Engine · 08/22/2003 (10:17 am) · 6 replies
I am trying to compile torque on OS X 10.2.6, using codewarrior 8. I've tried with the latest HEAD, and 1.1.1.2, and am having no luck with either. (I also tried going back the july first source, per something someone suggested in a post, but no luck there either.)
I have OpenGL, and the latest carbon (1.6) in the right places. (It's possible that carbon 1.6 is too new?)
The error I am getting with the latest HEAD seems to have something to do with the new operator.
Error : illegal 'operator' declaration
(included from:
platformAL.h:10
audioBuffer.cc:6)
platform.h line 381 extern void* FN_CDECL operator new(dsize_t size, void* ptr);
I'm getting a number of errors like this, and naturally many other errors that have to do with new not being defined properly.
If someone has a suggestion as to what I could try, I would appreciate hearing it. I've tried looking at the other reports of compiling problems on the Mac, but I wasn't able to connect them to my problem. I am new to this, so I may have missed something.
-Steve Lamperti
I have OpenGL, and the latest carbon (1.6) in the right places. (It's possible that carbon 1.6 is too new?)
The error I am getting with the latest HEAD seems to have something to do with the new operator.
Error : illegal 'operator' declaration
(included from:
platformAL.h:10
audioBuffer.cc:6)
platform.h line 381 extern void* FN_CDECL operator new(dsize_t size, void* ptr);
I'm getting a number of errors like this, and naturally many other errors that have to do with new not being defined properly.
If someone has a suggestion as to what I could try, I would appreciate hearing it. I've tried looking at the other reports of compiling problems on the Mac, but I wasn't able to connect them to my problem. I am new to this, so I may have missed something.
-Steve Lamperti
#2
ie
That was a Doh !! moment, hth :)
08/25/2003 (9:37 am)
Found the problem on Mac : I suppose those who have this problem have updated to GCC3.3 but like me forgot to follow some of the instructions in the docs : ie
Quote:
Using the GCC 3.3 compiler with Project Builder
This updater only installs the non-UI tools directly related to the gcc compiler. It does not update
Project Builder.
In order to make use of the 3.3 compiler in Project Builder projects, you must manually add
additional build settings to your projects. Each project target that you wish to change to use the
gcc 3.3 compiler must be modified by adding additional build settings. Follow these steps:
1) Click on the Targets tab
2) Select the Target you wish to change
3) Click the Expert View item under Settings
4) Click on the "+" graphic to add each of the following settings:
a. CC = /usr/bin/gcc-3.3
b. CPLUSPLUS = /usr/bin/g++-3.3
c. GCC_VERSION = 3.x
These three settings must be made for each build target you wish to have use the gcc 3.3
compiler. No other changes are required.
WARNING: Failure to make these changes will result in the
project not building if gcc 3.3 is selected as the default system
compiler, as the Project Builder build system will invoke gcc 2.9.5.
If the system default compiler is gcc 3.1, projects will
continue to build using the gcc 3.1 compiler without making
any changes.
That was a Doh !! moment, hth :)
#3
Thanks,
08/25/2003 (10:15 am)
Unless I am missing something, I am not sure if what you are describing applies to doing a build with codewarrior. I don't believe that I am using the GCC compiler, and I don't believe that I should need to. I checked to see that cc files were set to map to the regular code warrior C++ compiler, and that seems to be OK. If the above should apply to my project, and I am missing something, I would appreciate being enlightened.Thanks,
#4
That fixed that particular problem for me, so I'm not sure what you should do with CW.
Or were you getting a different error message about the new operator ?
I mean, I was getting it at exactly the same point, so you can understand how I got confused :)
I'm not even sure the cw project files are current on Mac.
Did you get it to work on the PC with CW ?
Sorry, but i'm quite at a loss about what to tell you and where to look for a solution to your troubles : with PB, it seems it was just a matter of the wrong compiler getting used and hence header confusion or something like that.
Hope you can get going asap, and again sorry I couldn't help you with your issue :(
08/25/2003 (1:52 pm)
Oh, sorry about that Steve : I was getting the exact same error as you about the new operator being defined with size_t as an operator, and I forgot you weren't using PB.That fixed that particular problem for me, so I'm not sure what you should do with CW.
Or were you getting a different error message about the new operator ?
I mean, I was getting it at exactly the same point, so you can understand how I got confused :)
I'm not even sure the cw project files are current on Mac.
Did you get it to work on the PC with CW ?
Sorry, but i'm quite at a loss about what to tell you and where to look for a solution to your troubles : with PB, it seems it was just a matter of the wrong compiler getting used and hence header confusion or something like that.
Hope you can get going asap, and again sorry I couldn't help you with your issue :(
#5
I have managed to get it up and running on Codewarrior on windows, although I am seeing a interesting problem with the mouselook that I haven't figured out yet. (I posted something about it on a different thread.)
Currently I am up and running on codewarrior on windows, VS 7.0 on windows, but not yet on the Mac.
It does sound like your problem is related to mine, but I'm afraid that I do not know enough about the differences between codewarrior, and PB, to know how to use the information.
Thanks for the suggestion.
08/25/2003 (2:07 pm)
Nicolas,I have managed to get it up and running on Codewarrior on windows, although I am seeing a interesting problem with the mouselook that I haven't figured out yet. (I posted something about it on a different thread.)
Currently I am up and running on codewarrior on windows, VS 7.0 on windows, but not yet on the Mac.
It does sound like your problem is related to mine, but I'm afraid that I do not know enough about the differences between codewarrior, and PB, to know how to use the information.
Thanks for the suggestion.
#6
extern void* FN_CDECL operator new(dsize_t size, void* ptr);
The error message, as mentioned above is
Error : illegal 'operator' declaration
If some one is successfully compiling in CW8 on the mac, could they check that line of code, and see if it's been changed? (line 385 in platform.h. ) If the code still looks the same, I would appreciate something like a screen shot of the project settings. It looks like it may be a compiler issue, as changing the compiler seems to be the solution when compiling under PB.
Edit:
Found it! It was dsize_t, which is declared as an unsigned int, and should be an unsigned long. This was discussed somewhere else on the forum, but I didn't make the connection until now.
09/04/2003 (2:12 pm)
I'm still having a problem on CW 8 on the Mac. Is anyone able to bring up the latest HEAD on CW 8 on the Mac? The problem, as mentioned above is when the new operator is declared externally in platform.h, and similar lines in other parts of the code:extern void* FN_CDECL operator new(dsize_t size, void* ptr);
The error message, as mentioned above is
Error : illegal 'operator' declaration
If some one is successfully compiling in CW8 on the mac, could they check that line of code, and see if it's been changed? (line 385 in platform.h. ) If the code still looks the same, I would appreciate something like a screen shot of the project settings. It looks like it may be a compiler issue, as changing the compiler seems to be the solution when compiling under PB.
Edit:
Found it! It was dsize_t, which is declared as an unsigned int, and should be an unsigned long. This was discussed somewhere else on the forum, but I didn't make the connection until now.
Torque Owner Lane Roathe