williamdeathsong / gamekit

Automatically exported from code.google.com/p/gamekit
0 stars 0 forks source link

patch to compile r445 on linux #77

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi

I have two problems to compil gamekit on Linux 32 bits

1)

Some tclap files are missing , i had to add those files below from 
http://sourceforge.net/projects/tclap/files/tclap-1.2.0.tar.gz/download

Dependencies/Source/tclap/include/tclap/SwitchArg.h
Dependencies/Source/tclap/include/tclap/ValuesConstraint.h
Dependencies/Source/tclap/include/tclap/XorHandler.h
Dependencies/Source/tclap/include/tclap/StdOutput.h
Dependencies/Source/tclap/include/tclap/UnlabeledValueArg.h
Dependencies/Source/tclap/include/tclap/Constraint.h
Dependencies/Source/tclap/include/tclap/MultiArg.h

2) There is a compil error located in the call to btAlignedObjectArray::resize 
in the copy constructor of btAlignedObjectArray  when btAlignedObjectArray is 
instantiated with btHashPtr as template because this one do not have an empty 
constructor.

btAlignedObjectArray<bthashptr> .....
resize (otherSize);
...
void    resize(int newsize, const T& fillData=T())

Adding this constructor to BtHashPtr helps.
REgarding the comment of the copy constructor , one can also comment it

In file included from 
/home/sasha/blender-svn/gamekit/Blender25/Serialize/BulletFileLoader/bCommon.h:2
2,
                 from /home/sasha/blender-svn/gamekit/Blender25/Serialize/BulletFileLoader/bFile.h:19,
                 from /home/sasha/blender-svn/gamekit/Blender25/Serialize/BlenderSerialize/bBlenderFile.h:20,
                 from /home/sasha/blender-svn/gamekit/Engine/Loaders/Blender2/gkBlendLoader.cpp:31:
/home/sasha/blender-svn/gamekit/bullet/src/LinearMath/btAlignedObjectArray.h: 
In member function ‘void btAlignedObjectArray<T>::resize(int, const T&) [with 
T = btHashPtr]’:
/home/sasha/blender-svn/gamekit/bullet/src/LinearMath/btAlignedObjectArray.h:128
:   instantiated from ‘btAlignedObjectArray<T>::btAlignedObjectArray(const 
btAlignedObjectArray<T>&) [with T = btHashPtr]’
/home/sasha/blender-svn/gamekit/bullet/src/LinearMath/btHashMap.h:205:   
instantiated from here
/home/sasha/blender-svn/gamekit/bullet/src/LinearMath/btAlignedObjectArray.h:128
: error: no matching function for call to ‘btHashPtr::btHashPtr()’
/home/sasha/blender-svn/gamekit/bullet/src/LinearMath/btHashMap.h:107: note: 
candidates are: btHashPtr::btHashPtr(const void*)
/home/sasha/blender-svn/gamekit/bullet/src/LinearMath/btHashMap.h:97: note:     
            btHashPtr::btHashPtr(const btHashPtr&)
make[2]: *** 
[Engine/CMakeFiles/OgreKitCore.dir/Loaders/Blender2/gkBlendLoader.cpp.o] Error 1

the exact output is located below , but adding a constructor without

Original issue reported on code.google.com by malo.sa...@gmail.com on 26 Jun 2010 at 2:00

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks, Bullet is in an external repository, so I added a local work around to 
the issue. 

Also added the missing files.

Original comment by snailr...@gmail.com on 26 Jun 2010 at 1:03