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.

ogre can't compile under gcc 4.3.0?

Postby liyu » Mon Jun 23, 2008 4:54 pm

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:
liyu
Gnoblar
 
Posts: 14
Kudos: 0
Joined: 30 Jul 2006

Postby sinbad » Tue Jun 24, 2008 12:37 pm

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.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
 
Posts: 19261
Kudos: 69
Joined: 06 Oct 2002
Location: Guernsey, Channel Islands

Postby liyu » Tue Jun 24, 2008 1:01 pm

great, I'll wait it :)
liyu
Gnoblar
 
Posts: 14
Kudos: 0
Joined: 30 Jul 2006

Postby th0br0 » Thu Jun 26, 2008 2:32 pm

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
th0br0
Gnoblar
 
Posts: 8
Kudos: 0
Joined: 08 Jun 2008

Re: ogre can't compile under gcc 4.3.0?

Postby Bekas » Thu Jun 26, 2008 5:41 pm

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
Bekas
OGRE Expert User
OGRE Expert User
 
Posts: 253
Kudos: 1
Joined: 16 Oct 2004

Re: ogre can't compile under gcc 4.3.0?

Postby liyu » Fri Jun 27, 2008 2:30 pm

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?
liyu
Gnoblar
 
Posts: 14
Kudos: 0
Joined: 30 Jul 2006

Postby Bekas » Fri Jun 27, 2008 2:56 pm

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
Bekas
OGRE Expert User
OGRE Expert User
 
Posts: 253
Kudos: 1
Joined: 16 Oct 2004


Return to Developer talk

Who is online

Users browsing this forum: No registered users and 5 guests