ARudik / gamekit

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

Compiling issue(s) #237

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. SVN checkout
2. cmake to mingw32 or Code::Blocks+mingw32
3. Compile via mingw32 command line or Code::Blocks

What is the expected output? What do you see instead?
Successful compile (I think). 

"
gkNearSensor.cpp||In member function 'virtual bool gkNearSensor::query()':|
error: cannot declare variable 'exec' to be of abstract type 
'gkAllContactResultCallback'|
note:   because the following virtual functions are pure within 
'gkAllContactResultCallback':|
btCollisionWorld.h|424|note:    virtual btScalar 
btCollisionWorld::ContactResultCallback::addSingleResult(btManifoldPoint&, 
const btCollisionObjectWrapper*, int, int, const btCollisionObjectWrapper*, 
int, int)|
etc.
"

What version of the product are you using? On what operating system?
SVN checkout, cmake 2.8.3, Code::Blocks 10.05 but also MinGW32 (whichever 
version comes bundled I guess). Win7 Ultimate 64-bit

Please provide any additional information below.
tl;dr

I first tried to configure the cmake dialog and it gave me an undefined 
precompiled header or something error which I worked around by setting the 
render back to 1.7. Then it would get to 64%, throw the 
fromaxisangle/fromangleaxis error. This was after I had to set the make 
location since it was looking for make.exe from $make, not the mingw make.  
Then it would get to 99% and fail. Trying again today, I found the error was 
caused by not having OpenGL 2 ES support on my system so I disabled the cmake 
flag. This permitted the use of the 1.8 renderer, but now fails at 100% due to 
the above issue. I might update cmake again, but there was the error where one 
of the ogre files would pass a bad multithreaded flag and take out the 
compilation process.

http://www.ogre3d.org/forums/viewtopic.php?f=2&t=63559

There's a link to that issue and fix since it still seems to exist.

P.s. if this all sounds retarded, it probably is, because I was hoping I could 
download this, compile, and have it spit out a .dll I could mess around with. 
If I am sorely mistaken I apologize.

Original issue reported on code.google.com by JacobWat...@gmail.com on 7 Jun 2012 at 5:29

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'm experiencing the same issue (also as a first time user).

Ubuntu 10.10 64 bit
gcc 4.6.3
cmake 2.8.7 (generator: Unix Makefiles)

Exact reproduction steps:
svn checkout http://gamekit.googlecode.com/svn/trunk/ gamekit # revision 1086
cd gamekit
mkdir build
cd build
cmake .. # all external packages found
make

Relevant output:

[ 99%] Building CXX object 
Engine/CMakeFiles/OgreKitCore.dir/__/Ogre-1.8rc/Bin/OgreKitCore/compile_OgreKitC
ore_1.cpp.o
In file included from 
../Ogre-1.8rc/Bin/OgreKitCore/compile_OgreKitCore_1.cpp:27:0:
../Engine/LogicBricks/gkNearSensor.cpp: In member function ‘virtual bool 
gkNearSensor::query()’:
../Engine/LogicBricks/gkNearSensor.cpp:66:29: error: cannot declare variable 
‘exec’ to be of abstract type ‘gkAllContactResultCallback’
../Engine/./Physics/gkContactTest.h:33:7: note:   because the following virtual 
functions are pure within ‘gkAllContactResultCallback’:
../bullet/src/BulletCollision/CollisionDispatch/btCollisionWorld.h:424:20: 
note:   virtual btScalar 
btCollisionWorld::ContactResultCallback::addSingleResult(btManifoldPoint&, 
const btCollisionObjectWrapper*, int, int, const btCollisionObjectWrapper*, 
int, int)
In file included from 
../Ogre-1.8rc/Bin/OgreKitCore/compile_OgreKitCore_1.cpp:29:0:
../Engine/LogicBricks/gkRadarSensor.cpp: In member function ‘virtual bool 
gkRadarSensor::query()’:
../Engine/LogicBricks/gkRadarSensor.cpp:88:29: error: cannot declare variable 
‘exec’ to be of abstract type ‘gkAllContactResultCallback’
../Engine/./Physics/gkContactTest.h:33:7: note:   since type 
‘gkAllContactResultCallback’ has pure virtual functions
make[2]: *** 
[Engine/CMakeFiles/OgreKitCore.dir/__/Ogre-1.8rc/Bin/OgreKitCore/compile_OgreKit
Core_1.cpp.o] Error 1
make[1]: *** [Engine/CMakeFiles/OgreKitCore.dir/all] Error 2
make: *** [all] Error 2

Original comment by bdakk...@gmail.com on 7 Jun 2012 at 8:58

GoogleCodeExporter commented 9 years ago
The last Bullet commit is huge and has caused issues. Downgrade to the previous 
one until it's resolved:

    cd bullet/src
    svn update -r2538

Original comment by kungfoobar@gmail.com on 8 Jun 2012 at 12:56

GoogleCodeExporter commented 9 years ago
Alright, I got mine to compile after fixing the FromAngleAxis to FromAxisAngle 
or vice-versa. The cpp/appgamekit demos run properly and everything. Now I just 
need to figure how to use it, presumably by mulling around with the cpp demo as 
there are no examples in the docs.

Is there an easy way (like just a different compiler command) to make an 
ogrekit.dll instead of everything being statically linked?

Original comment by JacobWat...@gmail.com on 8 Jun 2012 at 3:57

GoogleCodeExporter commented 9 years ago
Yes, just make a directory inside gamekit (let's call it sharedlib), with a 
file CMakeLists.txt, with this contents:

set(TargetName ogrekit)
include_directories(${OGREKIT_INCLUDE})
link_libraries(${OGREKIT_LIB})
add_library(${TargetName} SHARED)

Note that for compiling a 64 bits binary you will need to add -fPIC to 
CMAKE_C_FLAGS and CMAKE_CXX_FLAGS (in linux at least, I don't know if that's 
the case in windows). 

Original comment by kungfoobar@gmail.com on 8 Jun 2012 at 7:23

GoogleCodeExporter commented 9 years ago
I forgot... add subdirs(sharedlib) at the end of gamekit CMakeFiles.txt

Original comment by kungfoobar@gmail.com on 8 Jun 2012 at 7:24

GoogleCodeExporter commented 9 years ago
I did what you said and it spat out a 21kb dll, so I presume I did something 
wrong. All I had in the directory was the makefile. (I'm guessing I have to 
have an actual source-code file so it adds the used functions to the dll? I 
really have no idea what I'm doing if that wasn't clear :( )

Original comment by JacobWat...@gmail.com on 9 Jun 2012 at 12:10

GoogleCodeExporter commented 9 years ago
My bad, I didn't even check the file size.

After some investigations it seems OgreKit lacks a way for exporting/importing 
symbols in a shared library, like Ogre itself has. Take a look at the file 
Ogre-1.8rc/OgreMain/include/OgrePlatform.h lines 155-163 to see how Ogre does 
it. It has a macro _OgreExport which evaluates either to __declspec(dllexport), 
__declspec(dllimport) or nothing, depending on what and where are you 
compiling. It seems all ogre plugins (and most dependencies) has its own export 
macros.

Original comment by kungfoobar@gmail.com on 9 Jun 2012 at 2:30

GoogleCodeExporter commented 9 years ago
I have no idea what I'm doing, so I'm just going to statically link stuff I 
guess.

Are there tutorials on using gamekit via C++, or should I look more at using 
Blender or even tutorials for using the individual libraries?

If there's a better place to learn/discuss this stuff I'll go there.

Original comment by JacobWat...@gmail.com on 9 Jun 2012 at 5:28

GoogleCodeExporter commented 9 years ago
Yeah, the proper place is the forum: http://www.gamekit.org/

As for using the C++ API, the best resource is the code itself: the headers and 
the samples. There's no documentation but classes and methods have very 
descriptive names. There's documentation for the Lua API: 
http://gamekit.org/forum/viewtopic.php?f=9&t=408&p=1312

Also, I've doing Python bindings for gamekit, and I'm also documenting it. 
https://bitbucket.org/DiThi/pygamekit

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

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
** Comment 3 by project member kungfoobar@gmail.com, Jun 8 (4 days ago)
The last Bullet commit is huge and has caused issues. Downgrade to the previous 
one until it's resolved:

    cd bullet/src
    svn update -r2538

Does somebody work on that problem ?

Original comment by xelfes on 13 Jun 2012 at 12:50

GoogleCodeExporter commented 9 years ago
I've fixed it. Now it works with the latest Bullet trunk.

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