ogre can't compile under gcc 4.3.0?

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
liyu
Gnoblar
Posts: 14
Joined: Sun Jul 30, 2006 5:50 am

ogre can't compile under gcc 4.3.0?

Post by liyu »

I have compiled ogre 1.4.9 on gcc 3.4.5 succ, when i upgrade gcc to 4.3.0, it give me a error:

gcc\mingw32\4.3.0\include\c++\bits\stl_vector.h|179|instantiated from 'std::vector<Ogre::LinkedSkeletonAnimationSource, std::allocator<Ogre::LinkedSkeletonAnimationSource> >'|
..\include\OgreSkeleton.h|423|instantiated from here|

gcc\mingw32\4.3.0\include\c++\bits\boost_concept_check.h|216|error: '__gnu_cxx::_SGIAssignableConcept<_Tp>::__a' has incomplete type|
..\include\OgreSkeleton.h|53|error: forward declaration of 'struct Ogre::LinkedSkeletonAnimationSource'|

it seems gcc 4.3.0 add check to this, because c++ stand not say what should to when using a incomplete class in stl vector.

after some searching on google, I know i can rebuild gcc without concept-checks to walk around this problem, however, I think the best choice is to change the ogre code, will it?

btw, I suprised I am the only one use gcc 4.3 here? :shock:
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

LinkedSkeletonAnimationSource is predeclared earlier and defined later in the same header file, the reason is that there's a circular issue here. If gcc really won't allow this then we may have to change the list to a list of pointers instead, but other gcc 4.x versions have been happy with it. The latest I've tested with is 4.2 though.
liyu
Gnoblar
Posts: 14
Joined: Sun Jul 30, 2006 5:50 am

Post by liyu »

great, I'll wait it :)
th0br0
Gnoblar
Posts: 8
Joined: Sun Jun 08, 2008 9:56 pm

Post by th0br0 »

hey,
I just emerged gcc 4.3.1 here and although it is not 4.3.0, ogre appears to compile just fine with it
so it might just be a mingw32 bug.

th0br0
Bekas
OGRE Expert User
OGRE Expert User
Posts: 253
Joined: Sat Oct 16, 2004 11:21 pm
x 1

Re: ogre can't compile under gcc 4.3.0?

Post by Bekas »

liyu wrote:I know i can rebuild gcc without concept-checks to walk around this problem, however, I think the best choice is to change the ogre code, will it?
You can disable it from an include file.
-Open "MinGW\lib\gcc\mingw32\4.3.0\include\c++\mingw32\bits\c++config.h"
-Find "#define _GLIBCXX_CONCEPT_CHECKS 1" line and comment it out.

Concept checking is disabled by default when building gcc, don't know why the mingw version has it enabled..
MOGRE (Managed OGRE) - Advanced .NET wrapper for Ogre
liyu
Gnoblar
Posts: 14
Joined: Sun Jul 30, 2006 5:50 am

Re: ogre can't compile under gcc 4.3.0?

Post by liyu »

Bekas wrote: You can disable it from an include file.
-Open "MinGW\lib\gcc\mingw32\4.3.0\include\c++\mingw32\bits\c++config.h"
-Find "#define _GLIBCXX_CONCEPT_CHECKS 1" line and comment it out.

Concept checking is disabled by default when building gcc, don't know why the mingw version has it enabled..
This doesn't work for me, I think rebuild gcc is need, have u tried it?
Bekas
OGRE Expert User
OGRE Expert User
Posts: 253
Joined: Sat Oct 16, 2004 11:21 pm
x 1

Post by Bekas »

I didn't try compiling ogre, commenting out "#define _GLIBCXX_CONCEPT_CHECKS 1" worked when compiling codeblocks.
MOGRE (Managed OGRE) - Advanced .NET wrapper for Ogre
Post Reply