Offset with GCC 5

Expanding and utilizing the engine via C++.
6 posts Page 1 of 1
greenfire27
Posts: 5
Joined: Tue Nov 03, 2015 8:18 pm
by greenfire27 » Tue Nov 03, 2015 8:43 pm
Hi,

I'm the new lead for Torque 2D steering committee. One of the issues for T2D on Github is that it doesn't build on a flavor of Linux call Arch Linux using GCC 5.2.0. Someone recently suggested that the problem is that GCC > 4 is not supported which is true. The problem is shared between our code bases (platform/types.h on T2D and platform/types.gcc.h on T3D). You can look at the issue here:

https://github.com/GarageGames/Torque2D/issues/252

The change that is suggested will certainly get the code to build but I don't know if it's correct and it might lead to problems later when something is persisted. So my question is, what is the official way Torque will handle GCC 5? Which combination of Offset functions are correct? Thanks!
MilkywayM16
Posts: 38
Joined: Sat Oct 03, 2015 7:26 am
by MilkywayM16 » Wed Nov 04, 2015 3:42 pm
Sorry I can't be of any help here, I just wanted to pop in and say thank you for working on T2D. It's been kinda stagnant for a while and it's great to see it getting some attention! Good luck :)
greenfire27
Posts: 5
Joined: Tue Nov 03, 2015 8:18 pm
by greenfire27 » Wed Nov 04, 2015 6:11 pm
Thanks for the encouragement! It's a big job so I can use all the support I can get - even emotional support! Stagnant is not really a strong enough word. At this point the engine doesn't work on the latest version of 3 of our 6 target platforms. There are issues that were found and fixed two years ago but the code never made it into the code base. But I think with a little work that we can get things humming along again. It's going to be pretty exciting once we start doing releases!
JeffR
Steering Committee
Steering Committee
Posts: 755
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Wed Nov 04, 2015 7:52 pm
T3D's gotten a lot of work done on it to make it use SDL2 for most of the platform stuffs. It may be worth checking that out and seeing if that'd be more prudent than trying to maintain the platform layers manually.

If all the kinks with the platformSDL stuff get worked out, then conceptually you'd only need to maintain tidbits of gluecode, rather than entire platform layers.
greenfire27
Posts: 5
Joined: Tue Nov 03, 2015 8:18 pm
by greenfire27 » Wed Nov 04, 2015 8:12 pm
There were several people talking about doing that with T2D before they all disappeared. Apparently we currently only use it for Linux support and we're using some older, pre-release version. I can't say that it's something we'll do right away, but odds are we will eventually take the plunge. I'll check back here when the time comes, incase some kind soul wants to lend a hand.
greenfire27
Posts: 5
Joined: Tue Nov 03, 2015 8:18 pm
by greenfire27 » Sat Nov 14, 2015 7:35 pm
I added the following to type.h to support GCC 5. Hopefully this resolves the issues. If somebody with more knowledge on this topic wants to weigh in after the fact we can always change it again. Thanks!

#elif defined(TORQUE_COMPILER_GCC) && (__GNUC__ == 5)
#include <stddef.h>
#define Offset(x, cls) offsetof(cls, x)
#define OffsetNonConst(x, cls) _Offset_Normal(x, cls)
6 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest