Perhaps my last compilation error

sebastiend

28-09-2007 19:52:45

There is a problem that I don't know how to solve.



../include/NxOgreTrigger.h:: In constructor ‘NxOgre::TriggerCallback::TriMethodCallback<T>::TriMethodCallback(T*, void (T::*)(NxOgre::Trigger*, NxOgre::Actor*), void (T::*)(NxOgre::Trigger*, NxOgre::Actor*), void (T::*)(NxOgre::Trigger*, NxOgre::Actor*), void (T::*)(NxOgre::Trigger*, NxOgre::Character*), void (T::*)(NxOgre::Trigger*, NxOgre::Character*), void (T::*)(NxOgre::Trigger*, NxOgre::Character*))’:
../include/NxOgreTrigger.h:95: error: expected `{' before ‘CEnterPtr’


I use the cb project configured with my installations. Files are the nxogre HEAD. I didn't find anything about this on the forum.

betajaen

28-09-2007 20:25:49

CodeBlocks? I'm guessing the MingW or the GCC compiler?

I can't really help with either.

sebastiend

28-09-2007 22:07:05

Sorry.

It's gcc.

betajaen

28-09-2007 22:19:05

In Windows?

I've noticed GCC is more strict than Visual Studio, but I can't help you anyway.

sebastiend

29-09-2007 08:35:22

No, it's under Linux. I got the Physx 2.7.2 sdk, I now need this wrapper.

Game_Ender

29-09-2007 09:08:12

Its mostly likely something do with the includes and it now being able to find something at the top of the class definition.

sebastiend

29-09-2007 12:44:34

I found the release candidate 3 archive built for linux on a thread. The library is in, no compilation problem so :) .
NxOgre is really a nice work. I hope the first version will rock for good cross-platform physic in games.

betajaen

29-09-2007 12:51:45

0.4RC3? I should really delete that from the server.

[Edit]

I just did. I'm not supporting software that is over two years old.

sebastiend

29-09-2007 13:35:35

Might really be old if the current svn head is 0.9. It should work for a beginning, doesn't it? I'll perhaps wait for a linux compiled nxOgre or something more like a tutorial if modifications must be done in the source code and if I haven't got more time.

betajaen

29-09-2007 14:41:01

It's very old, two years infact. It's also using an older generation of interface, so all of the modern source and things you see here aren't compatible and it was written with an older version of PhysX. A PhysX not written for Linux.

Either way you can comment out that class or try and fix it, or be stuck in the olden days.

sebastiend

29-09-2007 15:20:51

So, it's still compilation time for me. I'll post what I need to do.

sebastiend

29-09-2007 15:45:08

So, first, no problems met about configuring different paths under cb.
I found sooner the preprocessor instructions and it begins to compile objects from sources.

About the error I posted to create this topic, I think a comma is missed:


TriMethodCallback(
T* v,
void (T::*AEnter)(Trigger*, Actor*),
void (T::*ALeave)(Trigger*, Actor*),
void (T::*AInside)(Trigger*, Actor*)
#if (NX_USE_CHARACTER_API == 1)
,void (T::*CEnter)(Trigger*, Character*),
void (T::*CLeave)(Trigger*, Character*),
void (T::*CInside)(Trigger*, Character*)
#endif
)

: mInstance(v),
AEnterPtr(AEnter), ALeavePtr(ALeave), AInsidePtr(AInside)
#if (NX_USE_CHARACTER_API == 1)

//There, I think CEnterPtr(CEnter), CLeavePtr(CLeave), CInsidePtr(CInside)
#endif
{}


I got : class 'NxOgre::SimplePlane' is implicitly friends with itself.
I comment the line causing the problem.

Before those two ones seeming easy to solve for me, if solved, there is those messages:


../include/NxOgreShapePrimitives.h:32: error: A key of class must be used at the declaration of a friend
../include/NxOgreShapePrimitives.h:32: error: friend declaration doesn't call a class or a function

Same thing for lines 67, 102, 136

betajaen

29-09-2007 15:51:46

Yep. A comma goes there.

And the "friend className" should be "friend class className. I'm sure I got them all last time.

sebastiend

29-09-2007 16:13:41

Some files seems missed, all NxOgreShapeDescription*

Here is the complete log. No libNxOgre.so created.

-------------- Build: Release in NxOgre ---------------
WARNING: Can't read file's timestamp: /home/sebastiend/Bureau/nxogre3/NxOgre/source/NxOgreShapeDescription.cpp
WARNING: Can't read file's timestamp: /home/sebastiend/Bureau/nxogre3/NxOgre/source/NxOgreShapeDescriptionConvex.cpp
WARNING: Can't read file's timestamp: /home/sebastiend/Bureau/nxogre3/NxOgre/source/NxOgreShapeDescriptionMesh.cpp
WARNING: Can't read file's timestamp: /home/sebastiend/Bureau/nxogre3/NxOgre/source/NxOgreShapeDescriptionPrimitives.cpp
Compiling: ../source/NxOgreShapePrimitives.cpp
Compiling: ../source/NxOgreUserStream.cpp
Compiling: ../source/NxOgreWorld.cpp
Linking dynamic library: ../lib/libNxOgre.so
g++: linux/source/NxOgreShapeDescription.o : No such file or directory
g++: linux/source/NxOgreShapeDescriptionConvex.o : No such file or directory
g++: linux/source/NxOgreShapeDescriptionMesh.o : No such file or directory
g++: linux/source/NxOgreShapeDescriptionPrimitives.o : No such file or directory
Process terminated with status 1 (0 minutes, 12 seconds)
0 errors, 0 warnings

betajaen

29-09-2007 17:51:03

It doesn't use those file names anymore, there called ShapeBlueprints; "NxOgreShapeBlueprint.cpp", "NxOgreShapeBlueprintMesh.h",etc.

Sounds like the code::blocks project is missing a few files. Just import all of the include and source files in the NxOgre directory

sebastiend

29-09-2007 18:42:31

My bad... I didn't check this, I thought it was done, beginner's mistake.

I'll look later to needed mods.


/home/sebastiend/Bureau/nxogre3/NxOgre/source/NxOgreCloth.cpp:: In member function ‘NxClothMesh* NxOgre::Cloth::__createClothMeshFromOgreMesh(const NxOgre::NxString&, const NxOgre::NxString&)’:
/home/sebastiend/Bureau/nxogre3/NxOgre/source/NxOgreCloth.cpp:572: error: no matching function for call to ‘NxPhysicsSDK::createClothMesh(MemoryReadBuffer)’
/usr/include/PhysX/v2.7.2/SDKs/Physics/include/NxPhysicsSDK.h:544: note: candidates are: virtual NxClothMesh* NxPhysicsSDK::createClothMesh(NxStream&)
/home/sebastiend/Bureau/nxogre3/NxOgre/source/NxOgreCloth.cpp:: In member function ‘NxClothMesh* NxOgre::Cloth::__createClothMesh(NxReal, NxReal, NxReal)’:
/home/sebastiend/Bureau/nxogre3/NxOgre/source/NxOgreCloth.cpp:733: error: no matching function for call to ‘NxPhysicsSDK::createClothMesh(MemoryReadBuffer)’
/usr/include/PhysX/v2.7.2/SDKs/Physics/include/NxPhysicsSDK.h:544: note: candidates are: virtual NxClothMesh* NxPhysicsSDK::createClothMesh(NxStream&)
:: === Build finished: 4 errors, 0 warnings ===

betajaen

29-09-2007 20:22:06

Cloth may not be available on Linux. I may be wrong, or for some reason I've disabled it.

sebastiend

30-09-2007 09:55:44

I commented lines including NxOgreClothRaycaster.h and NxOgreCloth.h and removed cloth files to go further.
I have got something new:


NxOgreCooking.cpp:: In function ‘NxHeightField* NxOgre::NxGenerateHeightFieldFromImage(const NxOgre::NxString&, NxScene*)’:
NxOgreCooking.cpp:570: attention : converting to ‘NxI16’ from ‘NxReal’
NxOgreCooking.cpp:: In function ‘NxHeightField* NxOgre::NxGenerateHeightFieldFromRaw(const NxOgre::NxString&, NxScene*)’:
NxOgreCooking.cpp:618: attention : converting to ‘NxU32’ from ‘NxReal’
NxOgreCooking.cpp:619: attention : converting to ‘NxU32’ from ‘NxReal’
NxOgreCooking.cpp:657: attention : converting to ‘NxU32’ from ‘NxReal’
NxOgreCooking.cpp:662: attention : converting to ‘NxI16’ from ‘NxReal’
NxOgreEnumsBlueprint.cpp:: In member function ‘NxOgre::StringList NxOgre::Blueprints::EnumsBlueprint::AsNxFluidSimulationMethod()’:
NxOgreEnumsBlueprint.cpp:576: erreur: ‘NX_F_SPH’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:579: erreur: ‘NX_F_NO_PARTICLE_INTERACTION’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:582: erreur: ‘NX_F_MIXED_MODE’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:: In member function ‘NxOgre::StringList NxOgre::Blueprints::EnumsBlueprint::AsNxFluidCollisionMethod()’:
NxOgreEnumsBlueprint.cpp:595: erreur: ‘NX_F_STATIC’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:598: erreur: ‘NX_F_DYNAMIC’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:: In member function ‘NxOgre::StringList NxOgre::Blueprints::EnumsBlueprint::AsNxFluidFlag()’:
NxOgreEnumsBlueprint.cpp:611: erreur: ‘NX_FF_VISUALIZATION’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:614: erreur: ‘NX_FF_DISABLE_GRAVITY’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:618: erreur: ‘NX_FF_COLLISION_TWOWAY’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:623: erreur: ‘NX_FF_ENABLED’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:628: erreur: ‘NX_FF_HARDWARE’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:: In member function ‘NxOgre::StringList NxOgre::Blueprints::EnumsBlueprint::AsNxEmitterType()’:
NxOgreEnumsBlueprint.cpp:645: erreur: ‘NX_FE_CONSTANT_PRESSURE’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:648: erreur: ‘NX_FE_CONSTANT_FLOW_RATE’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:: In member function ‘NxOgre::StringList NxOgre::Blueprints::EnumsBlueprint::AsNxEmitterShape()’:
NxOgreEnumsBlueprint.cpp:661: erreur: ‘NX_FE_RECTANGULAR’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:664: erreur: ‘NX_FE_ELLIPSE’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:: In member function ‘NxOgre::StringList NxOgre::Blueprints::EnumsBlueprint::AsNxFluidEmitterFlag()’:
NxOgreEnumsBlueprint.cpp:677: erreur: ‘NX_FEF_VISUALIZATION’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:698: erreur: ‘NX_FEF_FORCE_ON_BODY’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:708: erreur: ‘NX_FEF_ADD_BODY_VELOCITY’ was not declared in this scope
NxOgreEnumsBlueprint.cpp:712: erreur: ‘NX_FEF_ENABLED’ was not declared in this scope
:: === Build finished: 23 errors, 0 warnings ===

betajaen

30-09-2007 09:59:19

Fluids aren't in Linux as well it seems. Just disable them with the flag "NX_SDK_FLUIDS_ENABLED" (or something like it, you'll see it in the file) in the file NxOgreStable.h

sebastiend

30-09-2007 10:39:02

Strange...
My flags putted in the cb project are:

NX_LINUX
LINUX
CORELIB
NX32
NX_DISABLE_FLUIDS
NX_DISABLE_HARDWARE

Looking to NxOgreStable, it would have no problem:


#if defined NX_LINUX
# define NX_USE_FLUID_API 0
# define NX_USE_SOFTBODY_API 1
# define NX_MEMORY_COOKING 0
# define NX_DISK_COOKING 1
# define NxExport
...
#endif

#if (NX_SDK_VERSION_NUMBER >= 270)
# define NX_USE_CHARACTER_API 1

# ifndef NX_LINUX
# define NX_USE_FLUID_API 1
# endif

sebastiend

02-10-2007 21:31:08

No more help? Please... I didn't see anything looking like NX_SDK_FLUIDS_ENABLED but tried putting this flag and NX_SDK_FLUIDS_DISABLED too which didn't change anything.