Build problems
supermael
12-07-2010 23:08:27
Hi !
First, I'm French so excuse me for my English...
I want to use NxOgre for my application, but I've some problems to implement the wrapper.
When I build my project, I find some "errors" in NxOgreArray.h :
C:\NxOgre\sdk\include/NxOgreArray.h:58:24: error: expected nested-name-specifier before 'T'
C:\NxOgre\sdk\include/NxOgreArray.h:58:25: error: expected ';' before '*' token
C:\NxOgre\sdk\include/NxOgreArray.h:127:24: error: 'TIterator' has not been declared
C:\NxOgre\sdk\include/NxOgreArray.h:127:41: error: 'TIterator' has not been declared
C:\NxOgre\sdk\include/NxOgreArray.h:127:56: error: 'TIterator' has not been declared
C:\NxOgre\sdk\include/NxOgreArray.h:160:42: error: 'TIterator' has not been declared
C:\NxOgre\sdk\include/NxOgreArray.h:160:59: error: 'TIterator' has not been declared
C:\NxOgre\sdk\include/NxOgreArray.h:166:41: error: 'TIterator' has not been declared
C:\NxOgre\sdk\include/NxOgreArray.h:166:58: error: 'TIterator' has not been declared
C:\NxOgre\sdk\include/NxOgreArray.h:173:7: error: 'TIterator' does not name a type
C:\NxOgre\sdk\include/NxOgreArray.h: In constructor 'NxOgre::Functions::SharedArray<T>::SharedArray(int)':
C:\NxOgre\sdk\include/NxOgreArray.h:62:8: error: '_First' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:62:17: error: '_Last' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:62:25: error: '_End' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h: In destructor 'NxOgre::Functions::SharedArray<T>::~SharedArray()':
C:\NxOgre\sdk\include/NxOgreArray.h:69:12: error: '_First' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:71:32: error: '_End' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:74:8: error: '_First' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:74:17: error: '_Last' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:74:25: error: '_End' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h: In member function 'size_t NxOgre::Functions::SharedArray<T>::size()':
C:\NxOgre\sdk\include/NxOgreArray.h:89:22: error: '_Last' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:89:30: error: '_First' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h: In member function 'size_t NxOgre::Functions::SharedArray<T>::capacity()':
C:\NxOgre\sdk\include/NxOgreArray.h:94:22: error: '_End' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:94:29: error: '_First' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h: In member function 'T& NxOgre::Functions::SharedArray<T>::get(size_t)':
C:\NxOgre\sdk\include/NxOgreArray.h:99:17: error: '_First' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h: In member function 'size_t NxOgre::Functions::SharedArray<T>::where(const T&)':
C:\NxOgre\sdk\include/NxOgreArray.h:104:8: error: 'TIterator' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:104:18: error: expected ';' before 'begin'
C:\NxOgre\sdk\include/NxOgreArray.h:105:14: error: 'begin' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:105:23: error: 'last' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:107:25: error: '_First' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h: In member function 'void NxOgre::Functions::SharedArray<T>::insert(T)':
C:\NxOgre\sdk\include/NxOgreArray.h:113:13: error: '_End' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:113:21: error: '_Last' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:118:10: error: '_Last' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h: In member function 'void NxOgre::Functions::SharedArray<T>::removeAll()':
C:\NxOgre\sdk\include/NxOgreArray.h:124:8: error: '_Last' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:124:16: error: '_First' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h: In member function 'void NxOgre::Functions::SharedArray<T>::copy(int, int, int)':
C:\NxOgre\sdk\include/NxOgreArray.h:130:10: error: invalid type argument of unary '*'
C:\NxOgre\sdk\include/NxOgreArray.h:130:18: error: invalid type argument of unary '*'
C:\NxOgre\sdk\include/NxOgreArray.h: In member function 'void NxOgre::Functions::SharedArray<T>::clip(size_t)':
C:\NxOgre\sdk\include/NxOgreArray.h:135:28: error: 'shared_array' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h: In member function 'void NxOgre::Functions::SharedArray<T>::resize(size_t)':
C:\NxOgre\sdk\include/NxOgreArray.h:149:8: error: 'TIterator' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:149:18: error: expected ';' before 'new_first'
C:\NxOgre\sdk\include/NxOgreArray.h:150:24: error: 'new_first' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:151:13: error: '_First' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:151:21: error: '_Last' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h:152:31: error: '_End' was not declared in this scope
C:\NxOgre\sdk\include/NxOgreArray.h: In static member function 'static void NxOgre::Functions::SharedArray<T>::range_destruct(int, int)':
C:\NxOgre\sdk\include/NxOgreArray.h:169:11: error: invalid type argument of unary '*'
C:\NxOgre\sdk\include/NxOgreArray.h: At global scope:
C:\NxOgre\sdk\include/NxOgreArray.h:190:22: error: expected nested-name-specifier before 'T'
C:\NxOgre\sdk\include/NxOgreArray.h:190:23: error: expected ';' before '*' token
C:\NxOgre\sdk\include/NxOgreArray.h:221:9: error: 'TIterator' does not name a type
C:\NxOgre\sdk\include/NxOgreArray.h:310:32: error: 'TIterator' has not been declared
C:\NxOgre\sdk\include/NxOgreArray.h:310:49: error: 'TIterator' has not been declared
C:\NxOgre\sdk\include/NxOgreArray.h:310:64: error: 'TIterator' has not been declared
C:\NxOgre\sdk\include/NxOgreArray.h: In constructor 'NxOgre::Functions::ArrayFunctions<T*>::SharedArray::SharedArray(int)':
C:\NxOgre\sdk\include/NxOgreArray.h:200:10: error: '_First' was not declared in this scope
Why I have these errors ?
I hope you can help me,
supermael.
supermael
14-07-2010 10:27:34
No idea ? I really want to use this wrapper, but I have to resolve this problem...
betajaen
14-07-2010 11:59:48
Are you using Detritus or BloodyMess?
If BloodyMess, then you should use Detritus.
supermael
14-07-2010 12:09:10
What's the difference ?
Can I use the tutorial of BloodyMess with Detritus ?
Thank you for your help.
betajaen
14-07-2010 12:15:51
supermael
14-07-2010 12:18:55
Ok ! I'm going to try. Thank you !
supermael
14-07-2010 12:56:53
I still have some problems....
I compiled with succes in release mode, with visual c++ 2008. But I use codeBlocks with my project. WHen I compile my project with "#include <NxOgre.h> I have this :
C:\NxOgre\sdk/NxOgreType2Id.h:15:57: error: must #include <typeinfo> before using typeid
In file included from C:\NxOgre\sdk/NxOgreBuffer.h:36:0,
from C:\NxOgre\sdk/NxOgreString.h:35,
from C:\NxOgre\sdk/NxOgreErrorStream.h:36,
from C:\NxOgre\sdk/NxOgreCommon.h:46,
from C:\NxOgre\sdk/NxOgreActor.h:33,
from C:\Users\Mael\Desktop\OgreProject\Character.h:9,
from C:\Users\Mael\Desktop\OgreProject\Character.cpp:1:
C:\NxOgre\sdk/NxOgreSharedPointer.h: At global scope:
C:\NxOgre\sdk/NxOgreSharedPointer.h:49:54: error: template declaration of 'NxOgre::NxOgrePublicTemplateClass NxOgre::SharedPointer'
C:\NxOgre\sdk/NxOgreSharedPointer.h:49:54: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
C:\NxOgre\sdk/NxOgreSharedPointer.h:51:3: error: expected primary-expression before 'public'
C:\NxOgre\sdk/NxOgreSharedPointer.h:51:3: error: expected '}' before 'public'
C:\NxOgre\sdk/NxOgreSharedPointer.h:59:41: error: ISO C++ forbids declaration of 'SharedPointer' with no type
C:\NxOgre\sdk/NxOgreSharedPointer.h:59:41: error: only declarations of constructors can be 'explicit'
C:\NxOgre\sdk/NxOgreSharedPointer.h: In function 'int NxOgre::SharedPointer(user_type*)':
C:\NxOgre\sdk/NxOgreSharedPointer.h:60:6: error: only constructors take base initializers
C:\NxOgre\sdk/NxOgreSharedPointer.h:62:9: error: 'mPtr' was not declared in this scope
C:\NxOgre\sdk/NxOgreSharedPointer.h:63:6: error: 'mReferences' was not declared in this scope
C:\NxOgre\sdk/NxOgreSharedPointer.h:64:4: warning: no return statement in function returning non-void
C:\NxOgre\sdk/NxOgreSharedPointer.h: At global scope:
C:\NxOgre\sdk/NxOgreSharedPointer.h:66:24: error: 'SharedPointer' does not name a type
C:\NxOgre\sdk/NxOgreSharedPointer.h:66:39: error: ISO C++ forbids declaration of 'other' with no type
C:\NxOgre\sdk/NxOgreSharedPointer.h:66:44: error: ISO C++ forbids declaration of 'SharedPointer' with no type
C:\NxOgre\sdk/NxOgreSharedPointer.h: In function 'int NxOgre::SharedPointer(const int&)':
C:\NxOgre\sdk/NxOgreSharedPointer.h:67:6: error: only constructors take base initializers
C:\NxOgre\sdk/NxOgreSharedPointer.h:69:5: error: 'mPtr' was not declared in this scope
C:\NxOgre\sdk/NxOgreSharedPointer.h:69:18: error: request for member 'mPtr' in 'other', which is of non-class type 'const int'
C:\NxOgre\sdk/NxOgreSharedPointer.h:70:5: error: 'mReferences' was not declared in this scope
C:\NxOgre\sdk/NxOgreSharedPointer.h:70:25: error: request for member 'mReferences' in 'other', which is of non-class type 'const int'
C:\NxOgre\sdk/NxOgreSharedPointer.h:73:4: warning: no return statement in function returning non-void
C:\NxOgre\sdk/NxOgreSharedPointer.h: At global scope:
C:\NxOgre\sdk/NxOgreSharedPointer.h:75:4: error: 'SharedPointer' does not name a type
C:\NxOgre\sdk/NxOgreSharedPointer.h:86:24: error: 'SharedPointer<user_type>' does not name a type
C:\NxOgre\sdk/NxOgreSharedPointer.h:86:50: error: ISO C++ forbids declaration of 'other' with no type
C:\NxOgre\sdk/NxOgreSharedPointer.h:86:55: error: ISO C++ forbids declaration of 'SharedPointer' with no type
C:\NxOgre\sdk/NxOgreSharedPointer.h: In function 'int NxOgre::SharedPointer(const int&)':
C:\NxOgre\sdk/NxOgreSharedPointer.h:87:6: error: only constructors take base initializers
C:\NxOgre\sdk/NxOgreSharedPointer.h:89:5: error: 'mPtr' was not declared in this scope
C:\NxOgre\sdk/NxOgreSharedPointer.h:89:18: error: request for member 'getPtr' in 'other', which is of non-class type 'const int'
C:\NxOgre\sdk/NxOgreSharedPointer.h:90:5: error: 'mReferences' was not declared in this scope
C:\NxOgre\sdk/NxOgreSharedPointer.h:90:25: error: request for member 'getReferencesPtr' in 'other', which is of non-class type 'const int'
C:\NxOgre\sdk/NxOgreSharedPointer.h:93:4: warning: no return statement in function returning non-void
C:\NxOgre\sdk/NxOgreSharedPointer.h: At global scope:
C:\NxOgre\sdk/NxOgreSharedPointer.h:96:4: error: 'SharedPointer' does not name a type
C:\NxOgre\sdk/NxOgreSharedPointer.h:106:4: error: expected unqualified-id before 'virtual'
C:\NxOgre\sdk/NxOgreSharedPointer.h:111:11: error: 'T' does not name a type
C:\NxOgre\sdk/NxOgreSharedPointer.h:117:11: error: 'T' does not name a type
C:\NxOgre\sdk/NxOgreSharedPointer.h:123:11: error: 'T' does not name a type
C:\NxOgre\sdk/NxOgreSharedPointer.h:129:14: error: variable or field 'bind' declared void
C:\NxOgre\sdk/NxOgreSharedPointer.h:129:14: error: 'T' was not declared in this scope
C:\NxOgre\sdk/NxOgreSharedPointer.h:129:17: error: 'ptr' was not declared in this scope
In file included from C:\Users\Mael\Desktop\OgreProject\Character.h:9:0,
from C:\Users\Mael\Desktop\OgreProject\Character.cpp:1:
C:\NxOgre\sdk/NxOgreActor.h:848:1: error: expected '}' at end of input
Thank you again for your help,
Supermael.
betajaen
14-07-2010 13:20:11
I've never used Code::Blocks in Windows before.
It is best to compile NxOgre in Visual Studio, and I wouldn't know if you could compile NxOgre in Code::Blocks because the PhysX SDK was written with Visual Studio in mind.
supermael
14-07-2010 13:43:06
Ok, so I think I'll change my IDE.
betajaen
14-07-2010 13:44:10
You could probably edit all your files in Code::Blocks but it would have to be compiled with Visual Studio, or at least it's compiler.
supermael
30-07-2010 17:46:41
I have seen the detritus' tutorials but I have some questions :
- What's Critter ?
- Which RenderSystem I have to use ?
Thank you for your help ! And excuse my bad english again.
Tibo6
30-07-2010 19:40:45
- Critter is the Ogre 3D render system.
- You are on Ogre forum, so use the Ogre render system which is... Critter ! You won
supermael
31-07-2010 09:30:09
Ok thank you ! I found Critter and downladed it.
supermael
31-07-2010 22:45:53
Sorry, But I still have a problem...
I run my application, where I link <NxOgre.h>.
The application works (there isn't any physic application, I just link NxOgre.h), but when I close this application, I've an exception :
First-chance exception at 0x563efa05 in LonkonProject.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x563efa05 in LonkonProject.exe: 0xC0000005: Access violation reading location 0x00000000.
in the file crt0dat.c, I don't know what's this file.
When I don't link <NxOgre.h>, application works well.
supermael
01-08-2010 23:01:35
No idea ?
supermael
03-08-2010 13:24:20
Nobody has a solution to my problem ? I really need a help...
supermael
03-08-2010 17:06:15
I found the problem... First, I compile my application in Release mode, but I have "NxOgreDebug.dll not found"
So I rename NxOgre.dll in NxOgreDebug.dll... no problems anymore with #include <NxOgre.h>
But when I create a world, I have this exception :
NxOgre::PhysXSystemSoftwareException
betajaen
03-08-2010 17:17:22
Your renaming a Release DLL as a Debug DLL? I'm surprised the program will even attempt to run.
I've never heard of "crt0dat.c", but I would start over again. Delete the NxOgre/Critter folder and grab the latest copies from the GitHub page and compile it.
supermael
04-08-2010 16:47:14
I have compiled with success the latest commit of NxOgre.
I haven't problems with the DLL anymore. But I still have the exception :
First-chance exception at 0x76c9fbae in LonkonProject.exe: Microsoft C++ exception: NxOgre::PhysXSystemSoftwareException at memory location 0x0025f480..
It's happened when I call the function NxOgre::World::createWorld()...
betajaen
04-08-2010 16:54:15
Is the PhysX runtime installed?
supermael
04-08-2010 16:55:51
Yes, but I can re-install all the PhysX sdk etc... maybe it can help.
supermael
04-08-2010 17:14:52
I reinstall PhysX and it works !
Thank you !
supermael
05-08-2010 21:32:01
And I come back with my problems !
In my application, I can make a cube which is falling without any problem. But when I use a Critter::BodyDescription like that, with this code :
Critter::BodyDescription desc;
desc.mMass = 0;
Critter::Body* FirstBody = mpv_PhysicRenderSystem->createBody(NxOgre::BoxDescription(1,1,1), NxOgre::Vec3(0,200,0.5), "cube.mesh", desc);
Or if I do that :
Critter::Body* FirstBody = mpv_PhysicRenderSystem->createBody(NxOgre::BoxDescription(1,1,1), NxOgre::Vec3(0,200,0.5), "cube.mesh");
FirstBody->setMass(0);
I obtain :
First-chance exception at 0x76e4fbae in LonkonProject.exe: Microsoft C++ exception: Ogre::InvalidParametersException at memory location 0x001aee50..
First-chance exception at 0x76e4fbae in LonkonProject.exe: Microsoft C++ exception: Ogre::InvalidParametersException at memory location 0x001aef94..
First-chance exception at 0x76e4fbae in LonkonProject.exe: Microsoft C++ exception: NxOgre::PhysXInternalErrorException at memory location 0x001af0b8..
I just want to disable the force on my body, is there an other way ? But why this code make exception ?
PS : I reinstall physX, NxOgre and Critter again.
betajaen
05-08-2010 21:50:09
Don't set the mass to zero. NxOgre will complain and won't create the body, which returns a null pointer, which your calling against which causes the crash.
Just use freeze flags or damping, or StaticGeometry if the house, or floor, etc.
supermael
05-08-2010 22:11:23
Are these flags in NxOgreEnums.h ?? Because I don't have any freeze or damping flags in this file.
betajaen
05-08-2010 22:30:42
supermael
05-08-2010 22:58:56
I'm using this code :
Critter::BodyDescription desc;
desc.mRigidbodyFlags |= NxOgre::DynamicRigidbodyFlags::FreezePosition;
Critter::Body* FirstBody = mpv_PhysicRenderSystem->createBody(NxOgre::BoxDescription(1,1,1), NxOgre::Vec3(0,-200,0.5), "cube.mesh", desc);
But it doesn't works, the cube is still falling.
supermael
09-08-2010 19:49:09
No idea ?
I tried with this code too :
Critter::BodyDescription desc;
desc.mRigidbodyFlags.add(NxOgre::DynamicRigidbodyFlags::DisableGravity);
Critter::Body* FirstBody = mpv_PhysicRenderSystem->createBody(NxOgre::BoxDescription(1,1,1), NxOgre::Vec3(0,200,0.5), "cube.mesh", desc);
But it seems not work, the cube still falling...