Opentnl And Gcc 4
by Ian Metcalfe · in Torque Game Engine · 09/14/2008 (8:44 pm) · 1 replies
Hi,
I'm in the process of scoping out GPL networking libs, and I noticed that OpenTNL won't build under GCC4 out of the box. I was wondering if there are any plans to 'fix' this, or whether anyone has had any luck hacking it to build?
Thanks
I'm in the process of scoping out GPL networking libs, and I noticed that OpenTNL won't build under GCC4 out of the box. I was wondering if there are any plans to 'fix' this, or whether anyone has had any luck hacking it to build?
Thanks
Brad
# if defined (__GNUC__)
# if __GNUC__ == 2
# define TNL_GCC_2
# elif __GNUC__ == 3
# define TNL_GCC_3
# else
# error "TNL: Unsupported version of GCC (see tnlMethodDispatch.cpp)"
# endif
and change it to
# if defined (__GNUC__)
# if __GNUC__ == 2
# define TNL_GCC_2
# elif __GNUC__ == 3
# define TNL_GCC_3
# else
# define TNL_GCC_3
# endif
It seems to work out ok if it just treats 4 the same way it treats 3. Once you track down all these through error messages, add -fPermissive to the makefiles that need it. The -fPermissive gets rid of some template error as I recall. Also I just kept going until I got libtnl and libtomycrypt to compile, not sure if you can get examples and such to compile using this method. You may also need to individually execute those makefiles instead of using the main makefile that just executes others so errors in non-critical parts don't stop the build process.
If you're interested in more options for networking libraries you can send me an email, I know of a couple. By now you've probably found them through google though.