PDA

View Full Version : GLM



Fugitive
04-06-2010, 01:42 PM
Sigh...GLM wont run on a Borland compiler...



GLM_DETAIL_IS_INT(signed char);
GLM_DETAIL_IS_INT(signed short);
GLM_DETAIL_IS_INT(signed int);
GLM_DETAIL_IS_INT(signed long);
GLM_DETAIL_IS_INT(highp_int_t);


[BCC32 Error] type_int.hpp(42): E2238 Multiple declaration for 'is_int<long>'


BTW, I had to #define GLM_COMPILER 0 just to get it past the fact that I wasnt using either VC or GCC.

Groovounet
04-06-2010, 02:13 PM
Unfortunately Borland compiler isn't supported...

I didn't even know that Borland Compiler still exist...

It might be possible to port GLM for Borland compiler with few changes but as I don't have it, I'm unable to do it.

Fugitive
04-06-2010, 02:29 PM
Hmmm...Well there is a free version of the compiler floating around:
http://edn.embarcadero.com/article/20633

Borland is still used, especially in the 'Builder' suite: C++ Builder 2010.

Any idea how to fix the multiple declarations?

Groovounet
04-06-2010, 04:30 PM
BC 5.5? Seriously this thing is something like 10 years old!
I actually thought that Borland has switch to GCC. It used to be partly the case at least.

To fix this there is the code upper the one you gave in the same file:

#if defined(GLM_COMPILER) &amp;&amp; (GLM_COMPILER & GLM_COMPILER_VC)
typedef signed __int64 highp_int_t;
typedef unsigned __int64 highp_uint_t;
#elif(defined(GLM_COMPILER) &amp;&amp; (GLM_COMPILER & GLM_COMPILER_GCC))
__extension__ typedef signed long long highp_int_t;
__extension__ typedef unsigned long long highp_uint_t;
//# if GLM_MODEL == GLM_MODEL_64
// typedef signed long highp_int_t;
// typedef unsigned long highp_uint_t;
//# elif GLM_MODEL == GLM_MODEL_32
// __extension__ typedef signed long long highp_int_t;
// __extension__ typedef unsigned long long highp_uint_t;
//# endif//GLM_MODEL
#else
typedef signed long highp_int_t;
typedef unsigned long highp_uint_t;
#endif//GLM_COMPILER


And the question is how BC define 64 bits int on 32 bits and 64 bits platform.

If you find an answer, I can apply the patch and try to bring BC support to GLM.

However, I doubt that it would be the only issue...

Fugitive
04-07-2010, 10:45 AM
^No, BC 5.5 is the 'free' version. The latest one is Embarcadero C++ Compiler 6.20. Not to be fussy, but BC 5.5 is about 4/5 years old, not 10, so its still quite useable.

Anyway, to answer your question about data-types used by C++ Builder:
http://docwiki.embarcadero.com/RADStudio/en/Simple_Types

Groovounet
04-08-2010, 05:34 PM
Allright, I'm going to make some changes following this. I'm not sure it will be enough but we will see.

Fugitive
04-09-2010, 12:17 PM
Any luck so far?

Groovounet
04-13-2010, 03:45 AM
I don't plan to actually support it or even test it. Sorry but I don't have the time for that.

Unfortunately, for next release, all you can expect is that you will have errors somewhere else. I fixed this problem only.

If you want a proper support, I invite you to submit a patch
https://sourceforge.net/apps/trac/glf/report/1

Thanks