ahlekoofe / gamekit

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

Compiling issue #239

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
steps that reproduce the problem
1. svn checkout
2. running cmake-gui v2.8.8 for Visual studio 10 config
3. Build solution with visual studio 10

First of all. I got this error gamekit\engine\Physics/gkRayTest.h(62): error 
C2719: 'rayCallback': formal parameter with __declspec(align('16')) won't be 
aligned gkSyncObj.cpp

and

gamekit\Engine\LogicBricks/gkNearSensor.cpp(66): error C2259: 
'gkAllContactResultCallback' : cannot instantiate abstract class
          due to following members:
          'btScalar btCollisionWorld::ContactResultCallback::addSingleResult(btManifoldPoint &,const btCollisionObjectWrapper *,int,int,const btCollisionObjectWrapper *,int,int)' : is abstract
          d:\gamekit\bullet\src\BulletCollision/CollisionDispatch/btCollisionWorld.h(424) : see declaration of 'btCollisionWorld::ContactResultCallback::addSingleResult'

I've attached the output below. 

I'm using windows 7 64

Best regard !

Original issue reported on code.google.com by xelfes on 12 Jun 2012 at 8:11

Attachments:

GoogleCodeExporter commented 8 years ago
I've fixed all issues with latest Bullet update in Linux. Can you update and 
test if it works on VS10, please?

Original comment by kungfoobar@gmail.com on 13 Jun 2012 at 4:11

GoogleCodeExporter commented 8 years ago
19>Time Elapsed 00:00:40.32
22>------ Build started: Project: OgreKitCore, Configuration: Debug Win32 ------
22>Build started 2012-06-13 13:02:02.
22>PrepareForBuild:
22>  Creating directory "D:\gamekitVS\Engine\Debug\".
22>InitializeBuildStatus:
22>  Creating "OgreKitCore.dir\Debug\OgreKitCore.unsuccessfulbuild" because 
"AlwaysCreate" was specified.
22>CustomBuild:
22>  Building Custom Rule D:/gamekitWork/Engine/CMakeLists.txt
22>  CMake does not need to re-run because 
D:\gamekitVS\Engine\CMakeFiles\generate.stamp is up-to-date.
22>ClCompile:
22>  gkWindowSystem.cpp
22>  OgreKitLua.cpp
22>d:\gamekitwork\engine\Physics/gkRayTest.h(62): error C2719: 'rayCallback': 
formal parameter with __declspec(align('16')) won't be aligned
22>  gkSyncObj.cpp
22>  compile_OgreKitCore_0.cpp
22>  compile_OgreKitCore_1.cpp
22>D:\gamekitWork\Engine\Physics\gkRayTest.h(62): error C2719: 'rayCallback': 
formal parameter with __declspec(align('16')) won't be aligned
22>  compile_OgreKitCore_2.cpp
22>d:\gamekitwork\engine\Physics/gkRayTest.h(62): error C2719: 'rayCallback': 
formal parameter with __declspec(align('16')) won't be aligned
22>D:\gamekitWork\Engine\Physics/gkRayTest.cpp(55): error C2719: 'rayCallback': 
formal parameter with __declspec(align('16')) won't be aligned
22>  compile_OgreKitCore_3.cpp
22>d:\gamekitwork\engine\Physics/gkRayTest.h(62): error C2719: 'rayCallback': 
formal parameter with __declspec(align('16')) won't be aligned
22>  Generating Code...
22>
22>Build FAILED.
22>
22>Time Elapsed 00:00:35.73
23>------ Build started: Project: AppOgreKit, Configuration: Debug Win32 ------
24>------ Build started: Project: AppCppDemo, Configuration: Debug Win32 ------
23>Build started 2012-06-13 13:02:38.
24>Build started 2012-06-13 13:02:38.
24>PrepareForBuild:
24>  Creating directory "D:\gamekitVS\Samples\CppDemo\Debug\".
24>InitializeBuildStatus:
24>  Creating "AppCppDemo.dir\Debug\AppCppDemo.unsuccessfulbuild" because 
"AlwaysCreate" was specified.
23>PrepareForBuild:
23>  Creating directory "D:\gamekitVS\Samples\Runtime\Debug\".
23>InitializeBuildStatus:
23>  Creating "AppOgreKit.dir\Debug\AppOgreKit.unsuccessfulbuild" because 
"AlwaysCreate" was specified.
24>CustomBuild:
24>  Building Custom Rule D:/gamekitWork/Samples/CppDemo/CMakeLists.txt
23>CustomBuild:
23>  Building Custom Rule D:/gamekitWork/Samples/Runtime/CMakeLists.txt
24>  CMake does not need to re-run because 
D:\gamekitVS\Samples\CppDemo\CMakeFiles\generate.stamp is up-to-date.
23>  CMake does not need to re-run because 
D:\gamekitVS\Samples\Runtime\CMakeFiles\generate.stamp is up-to-date.
23>ClCompile:
23>  Main.cpp
24>ClCompile:
24>  compile_AppCppDemo_0.cpp
24>D:\gamekitWork\Engine\Physics/gkRayTest.h(62): error C2719: 'rayCallback': 
formal parameter with __declspec(align('16')) won't be aligned
24>
24>Build FAILED.
24>
24>Time Elapsed 00:00:03.17
23>d:\gamekitwork\engine\Physics/gkRayTest.h(62): error C2719: 'rayCallback': 
formal parameter with __declspec(align('16')) won't be aligned
23>
23>Build FAILED.

Original comment by xelfes on 13 Jun 2012 at 5:04

GoogleCodeExporter commented 8 years ago
I did a fresh svn checkout and like you can see below, it's still does'ny work.

Original comment by xelfes on 13 Jun 2012 at 5:05

GoogleCodeExporter commented 8 years ago
About the last commit on Linux 3.4.0-1.fc17.x86_64, gcc version 4.7.0 20120507 
(Red Hat 4.7.0-5) (GCC), everything is working like a charm !

Original comment by xelfes on 13 Jun 2012 at 5:25

GoogleCodeExporter commented 8 years ago
Try this patch (inside bullet/src) on VS10. If it corrects the issue but fails 
in other similar points, try moving that member to the top of the struct/class 
like in the patch.

Original comment by kungfoobar@gmail.com on 13 Jun 2012 at 6:32

Attachments:

GoogleCodeExporter commented 8 years ago
Na.. nothing change :/

Original comment by xelfes on 13 Jun 2012 at 6:52

GoogleCodeExporter commented 8 years ago
It has something to do with btScalar.h line 45: It defines the alignment with 
_MSC_VER >= 1300 (VS2010 is 1600).

Original comment by kungfoobar@gmail.com on 13 Jun 2012 at 7:51

GoogleCodeExporter commented 8 years ago
Also try reversing this patch: 
http://gamekit.googlecode.com/issues/attachment?aid=2340002000&name=ray_fixes_an
d_xray_v2.patch&token=ZNyaFUN-ZDd9IirdBuA8l-gi4Xc%3A1339621058686

It is failing just where I wrote that code, but I doubt that's the only failing 
part.

Original comment by kungfoobar@gmail.com on 13 Jun 2012 at 9:00

GoogleCodeExporter commented 8 years ago
don't pass parameters by value, use a reference instead

bool gkRayTest::collides(const gkVector3& from, const gkVector3& 
to,gkRayTestFilter& rayCallback);

Original comment by erwin.coumans on 13 Jun 2012 at 11:59

GoogleCodeExporter commented 8 years ago
Everything seem to work fine now ! Thank you 

Original comment by xelfes on 14 Jun 2012 at 5:27

GoogleCodeExporter commented 8 years ago
I have a bad news since it's working on windows 7, it's does'nt work anymore 
with Linux 3.4.0-1.fc17.x86_64, gcc version 4.7.0 20120507 (Red Hat 4.7.0-5). 

I did a fresh svn checkout and cmake like usual. This is the output;

/home/xelfe/gamekit-work/Engine/LogicBricks/gkRaySensor.cpp:85:57: erreur: no 
matching function for call to ‘gkRayTest::collides(gkVector3&, gkVector3&, 
notMeFilter)’
/home/xelfe/gamekit-work/Engine/LogicBricks/gkRaySensor.cpp:85:57: note: 
candidates are:
In file included from 
/home/xelfe/gamekit-work/Engine/LogicBricks/gkRaySensor.cpp:33:0,
                 from /home/xelfe/gamekit-work/Ogre-1.8rc/Bin/OgreKitCore/compile_OgreKitCore_1.cpp:32:
/home/xelfe/gamekit-work/Engine/./Physics/gkRayTest.h:56:7: note: bool 
gkRayTest::collides(const Ogre::Ray&)
/home/xelfe/gamekit-work/Engine/./Physics/gkRayTest.h:56:7: note:   candidate 
expects 1 argument, 3 provided
/home/xelfe/gamekit-work/Engine/./Physics/gkRayTest.h:61:7: note: bool 
gkRayTest::collides(const gkVector3&, const gkVector3&, 
gkRayTest::gkRayTestFilter&)
/home/xelfe/gamekit-work/Engine/./Physics/gkRayTest.h:61:7: note:   no known 
conversion for argument 3 from ‘notMeFilter’ to 
‘gkRayTest::gkRayTestFilter&’
gmake[2]: *** 
[Engine/CMakeFiles/OgreKitCore.dir/__/Ogre-1.8rc/Bin/OgreKitCore/compile_OgreKit
Core_1.cpp.o] Erreur 1
gmake[2] : on quitte le répertoire « /home/xelfe/gamekit-build »
gmake[1]: *** [Engine/CMakeFiles/OgreKitCore.dir/all] Erreur 2
gmake: *** [all] Erreur 2
gmake[1] : on quitte le répertoire « /home/xelfe/gamekit-build »

Original comment by xelfes on 14 Jun 2012 at 5:52

GoogleCodeExporter commented 8 years ago
Fixed in trunk.

Original comment by kungfoobar@gmail.com on 14 Jun 2012 at 7:44