Page 1 of 1

Xcode build fails

Posted: Fri Oct 07, 2011 4:59 pm
by Teddy
Hi guys

I've been trying to build Orxonox with Xcode 4 and more or less surprisingly, I got only one error:
libraries/util/output/OutputDefinitions.h - Line 119 wrote:Integer constant is too large for 'long' type
I changed the 0xFFFFFFFFFFFFFFFF to 0xFFFFFFFFFFFFFFFFLL (and 0x0000000000000000 to 0x0000000000000000LL) to declare the constant value as long long and it worked.
But I'm new to all this stuff and so I just wanted to ask, whether I'm doing something wrong, or if I can upload this change.

Greez
Matthias

Re: Xcode build fails

Posted: Fri Oct 07, 2011 7:32 pm
by x3n
Hi Teddy,

Thanks for reporting! Kind of funny that you get this error, do you know which compiler (and which version) you use with XCode?

Your proposed fix is almost correct, but I think it should be "ull" instead of "ll" because it's in fact an unsigned number (note that it doesn't matter if you write "ull" or "ULL" - I just used the lower case version because in Orxonox we usually use "f" for float as in "0.5f", but it's not a rule). I would be glad if you commit it.

By the way, I believe there's some ongoing work to make Orxonox run better on Mac OS X, so you might find some problems in the trunk of Orxonox that are already fixed in the mac_osx2 branch.

Re: Xcode build fails

Posted: Sat Oct 08, 2011 10:59 am
by Teddy
Hi x3n

I'm using the LLVM GCC 4.2.
I changed it to ull (lower case) and committed it. I hope I did everything right :)
I also checked out the mac_osx2 branch and it looks like this file disappeared there. Shall I start working with this branch instead of the trunk?

Greez
Matthias

Re: Xcode build fails

Posted: Sat Oct 08, 2011 11:44 am
by x3n
Thanks, looks good!

Maybe your compiler or the XCode settings are a bit more restrictive since "long long" is not standard C++ (but it's standard C, which is the reason why all common compilers support it).

The mac_osx2 branch is quite old, that's why the file doesn't exist there. You should work with the trunk if possible. The work with the mac_osx2 branch is going slow at the moment, I'm not sure what the current state is. If you experience problems with the trunk we might try to motivate people to work on the mac_osx2 branch again. ;)

Re: Xcode build fails

Posted: Sat Oct 08, 2011 1:32 pm
by Teddy
I just used the standard settings created by CMake... but it seems to work now with this change (at least it compiles without errors & warnings).
So I'll not use the mac_osx2 branch and keep on working with the trunk.

Thx for your support :D