Compiling NxOgre 0.9 with Code::Blocks on Windows (Vista)?

AnTeevY

06-11-2007 18:27:23

Hey guys,
I fail :( I tried to use the Linux C::B project file and adjusted the search directories etc., but I get a "`_asm' was not declared in this scope" error in NxMath.h.
And when I try to import the VC8 project file into C::B, C::B crashes.

Is there something I have to pay attention to?

Thanks, Aty

AnTeevY

08-11-2007 14:43:26

Any idea? Building with VC8 does not work either (as I posted here: http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=5664).

betajaen

08-11-2007 14:54:34

Weird.

What's your Visual Studio setup?

AnTeevY

08-11-2007 15:47:03

Sorry, but what do you exactly mean with "setup"? Just installed Visual Studio 2005 Express and opened the VC8 project file.

betajaen

08-11-2007 15:53:33

What about the PlatformSDK, etc.?

AnTeevY

08-11-2007 17:59:32

Installing PlatformSDK did not change anything. (did these steps: http://msdn2.microsoft.com/en-us/express/aa700755.aspx)

Etc.? Nothing :)

betajaen

08-11-2007 18:07:58

Okay from the top. What versions of the applications you use, the libraries you use, and the rough steps of what you did to compile them.

AnTeevY

08-11-2007 18:18:45

As I said, I'm on Vista.

1) Followed the 5 steps: http://msdn2.microsoft.com/en-us/express/aa700755.aspx
2) Downloaded and installed "OGRE 1.4.5 SDK for Visual C++ .Net 2005 (8.0) SP1" from the OGRE Downloads Page
3) Followed the steps on http://www.nxogre.org/
4) Downloaded NxOgre folder via SVN and opened "NxOgre.VC8.Windows.sln"
5) Tried to compile.

betajaen

08-11-2007 18:32:25

Alright. I've traced the error, but many people use the Ogre SDK with NxOgre so I'm thinking that either the Platform SDK wasn't fully installed (the adding of the includes/libraries/etc. to the Visual Studio preferences) or it's something to do with the SDK.

Can you look at the five steps again and double check everything is correct, before I tell you to download a 300MB file?


[Edit]

Did you install BOTH of those Visual Studio Service Packs (SP 1 for Visual Studio and SP 1 for Visual Studio Vista).

AnTeevY

08-11-2007 18:57:35

- Double-checked the steps, nothing wrong.
- After the update (via Windows Update) there appears a message on startup: http://img142.imageshack.us/img142/2381/blahzm1.jpg
Don't know where I could download this update? Clicking "continue" just loads up the program...
- 300MB wouldn't be a problem (6mbit and flatrate)

AnTeevY

09-11-2007 21:53:18

Please do not forget me ;)

AnTeevY

12-11-2007 16:21:02

Sorry, I don't want to nerve you, but I just can't get this working :(

Okay, lib-building works now with VC8 (although I had to comment out all lines with "m_Mutex"). But what next? Is there a example project anywhere?

---------------------------------------------------------------------

Besides this, I'd prefer to work with Code::Blocks. I managed to compile PhysX SDK with CB, but got some linker errors:
Release\NxBoxes.o:NxBoxes.cpp:(.text+0xaa7): undefined reference to `PerfRenderer::render(NxProfileData const*, int, int)'
Release\NxBoxes.o:NxBoxes.cpp:(.text+0x1fdc): undefined reference to `PerfRenderer::toggleEnable()'
Release\NxBoxes.o:NxBoxes.cpp:(.text+0x204e): undefined reference to `PerfRenderer::PerfRenderer()'
collect2: ld returned 1 exit status

Which means I can't even build the standard PhysX SDK with CB! I googled and searched in different boards, but no results, Google doesn't even know the word PerfRenderer!

And now to NxOgre itself: Several problems.

1)Error:../include/NxOgreTrigger.h:95: error: expected `{' before "CEnterPtr"
Code:: mInstance(v),
AEnterPtr(AEnter), ALeavePtr(ALeave), AInsidePtr(AInside)
#if (NX_USE_CHARACTER_API == 1)
CEnterPtr(CEnter), CLeavePtr(CLeave), CInsidePtr(CInside)
#endif
{}

Solution:Comma misses behind "AInsidePtr(AInside)".

2)Error:../include/NxOgreSimpleShape.h:74: error: class `NxOgre::SimplePlane' is implicitly friends with itself

Code:class NxExport SimplePlane : public SimpleShape {

friend class SimplePlane;

Solution:Commenting out the line. (or changing it to "friend class SimpleShape"?)

3)Error (4times the same problem):../include/NxOgreShapePrimitives.h:32: error: a class-key must be used when declaring a friend
Code:friend GroundShape;
Solution:adding "class" behind "friend"

4)Error:mingw32-g++.exe: C:\Progging\NxOgre\compiler\linux\source\source\NxOgreShapeDescription.o: No such file or directory
mingw32-g++.exe: C:\Progging\NxOgre\compiler\linux\source\source\NxOgreShapeDescriptionConvex.o: No such file or directory
mingw32-g++.exe: C:\Progging\NxOgre\compiler\linux\source\source\NxOgreShapeDescriptionMesh.o: No such file or directory
mingw32-g++.exe: C:\Progging\NxOgre\compiler\linux\source\source\NxOgreShapeDescriptionPrimitives.o: No such file or directory

Solution:Delete the .h and .cpp files.

5)Error:Cannot export NxCooking_NULL_THUNK_DATA: symbol not found
Cannot export PhysXLoader_NULL_THUNK_DATA: symbol not found
C:\Progging\NxOgre\compiler\linux\source\source\NxOgreActor.o: In function `ZN6NxOgre5ActorC2ERKSsPNS_5SceneEPNS_14ShapeBlueprintERKNS_4PoseENS_11ActorParamsE':
C:/Progging/NxOgre/source/NxOgreActor.cpp:182: undefined reference to `NxOgre::NxCreateID(unsigned int, std::string)'
C:/Progging/NxOgre/source/NxOgreActor.cpp:206: undefined reference to `NxOgre::NxThrow(std::string, int, std::string, unsigned int)'
C:\Progging\NxOgre\compiler\linux\source\source\NxOgreActor.o: In function `ZN6NxOgre5ActorC1ERKSsPNS_5SceneEPNS_14ShapeBlueprintERKNS_4PoseENS_11ActorParamsE':
C:/Progging/NxOgre/source/NxOgreActor.cpp:182: undefined reference to `NxOgre::NxCreateID(unsigned int, std::string)'
C:/Progging/NxOgre/source/NxOgreActor.cpp:206: undefined reference to `NxOgre::NxThrow(std::string, int, std::string, unsigned int)'

...and so on... ~50 errors similar to those above.
Solution:No solution :( Added all the PhysX libs, and there are no NxOgre Libs yet?

Please help me, this stuff is killin' me :evil:

betajaen

12-11-2007 16:51:05

Okay. Slow down, lets fix the Visual Studio stuff before I tread into the unknown code::blocks stuff.

Commenting out that mutex stuff will probably cause a crash.

So let's replace those UserAllocator files with my own:

http://www.nxogre.org/NxOgreUserAllocator.cpp
http://www.nxogre.org/NxOgreUserAllocator.h

Re-compile NxOgre. You'll have one or two errors then, report back to me and I tell you what to do (it's really easy).

AnTeevY

12-11-2007 17:41:58

Thank you.

c:\progging\nxogre\source\nxogrecharactercontroller.cpp(79) : error C2512: 'NxOgre::UserAllocator' : no appropriate default constructor available
c:\progging\nxogre\source\nxogrephysxdriver.cpp(88) : error C2512: 'NxOgre::UserAllocator' : no appropriate default constructor available

c:\progging\nxogre\source\nxogreworld.cpp(232) : warning C4800: 'NxReal' : forcing value to bool 'true' or 'false' (performance warning)

betajaen

12-11-2007 17:47:57

NxOgreCharacterController.cpp:79
mControllerManager = NxCreateControllerManager(mAllocator);


NxOgrePhysXDriver.cpp:88
mAllocator = NxCreateAllocator("Global");


The warning doesn't matter.

AnTeevY

12-11-2007 17:56:38

The constructor looks like this:

CharacterController::CharacterController() {

mAllocator = new UserAllocator();
mControllerManager = NxCreateControllerManager(mAllocator);

mBaseHitReport = new BaseCharacterHitReport();
}


"mAllocator = NxCreateAllocator("Global");" fixed the other error though.

betajaen

12-11-2007 20:24:48

Whoops, I meant:

mAllocator = NxCreateAllocator("Character Controller");

AnTeevY

12-11-2007 20:45:35

Okay, only linker errors remain:

1> Creating library C:\Progging\NxOgre\\lib\NxOgre_d.lib and object C:\Progging\NxOgre\\lib\NxOgre_d.exp
1>NxOgreCloth.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Ogre::AxisAlignedBox::~AxisAlignedBox(void)" (__imp_??1AxisAlignedBox@Ogre@@QAE@XZ) referenced in function __unwindfunclet$??0Cloth@NxOgre@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVScene@1@ABVPose@1@VClothParams@1@@Z$0
1>NxOgreFluidMesh.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Ogre::AxisAlignedBox::~AxisAlignedBox(void)" (__imp_??1AxisAlignedBox@Ogre@@QAE@XZ)
1>NxOgreSoftBody.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Ogre::AxisAlignedBox::~AxisAlignedBox(void)" (__imp_??1AxisAlignedBox@Ogre@@QAE@XZ)
1>C:\Progging\NxOgre\\lib\NxOgre_d.dll : fatal error LNK1120: 1 unresolved externals

betajaen

12-11-2007 20:56:33

Looks like Ogre is now messed up. Which version are you using again?

AnTeevY

12-11-2007 21:00:24

1.4.5

AnTeevY

13-11-2007 17:05:49

and.... now?

betajaen

13-11-2007 17:16:30

Do the Ogre Samples work?

AnTeevY

13-11-2007 17:58:44

Yeah, most of them do work.

Well, I just cleaned the project and recompiled everything, and now it works... such an easy solution -_- (after linking there was a copying error, but I don't think that does matter... the libs are in the \libs folder now)

Okay, got the Debug and Release libs now - what's next? Could you give me some base code?

betajaen

13-11-2007 18:44:28

Well you have Cake to keep you company and if you haven't done so already. Read this [b]wonderfull guide[/b] by my friend Betajaen.

AnTeevY

13-11-2007 19:28:49

Okay, now I'm without problem on Visual Studio 2005 :) Thank you!

But it would be nice if you could help me on Code::Blocks (although I know you have no experience with it). I just changed the compiler for my OGRE projects from MinGW to the Visual Studio 2005 compiler and am able to build the OGRE samples problem-free.
Anyway, I'm running from error to error. I opened the Linux CB project, fixed all the paths, added new libraries, deleted the linux compiler flags, options, defines etc.
Currently I've got this:
NxOgreActor.cpp
c:\progging\nxogre\include\NxOgreParams.h(29) : error C2470: 'Params' : looks like a function definition, but there is no parameter list; skipping apparent body
c:\progging\nxogre\include\NxOgrePhysXDriver.h(35) : error C2470: 'PhysXDriverParams' : looks like a function definition, but there is no parameter list; skipping apparent body
c:\progging\nxogre\include\NxOgrePhysXDriver.h(68) : error C2470: 'PhysXDriver' : looks like a function definition, but there is no parameter list; skipping apparent body
c:\progging\nxogre\include\NxOgreContainer.h(60) : error C2989: 'NxOgre::NxExport' : class template has already been declared as a non-class template

(and much more...)

I'm sure I missed something, because I got none of those errors under the Visual Studio IDE, and this IS the Visual Studio 2005 compiler, so there shouldn't be a difference.

betajaen

13-11-2007 19:35:58

It may be down to these in the constructors.

PhysXDriverParams = PhysXDriverParams()

You could try and remove last bit of it and see if it compiles. But it's proper C++ syntax as far as I know.

AnTeevY

13-11-2007 20:49:37

hmhmhm did not work... here is my current error log:

c:\progging\nxogre\include\nxogreprerequisites.h(244) : error C2065: 'NxActorGroup' : undeclared identifier
c:\progging\nxogre\include\nxogreprerequisites.h(255) : error C2065: 'NxDominanceGroup' : undeclared identifier
c:\progging\nxogre\include\nxogreprerequisites.h(267) : error C2065: 'NxMaterialIndex' : undeclared identifier
c:\progging\nxogre\include\nxogreprerequisites.h(272) : error C2065: 'NxCollisionGroup' : undeclared identifier
c:\progging\nxogre\include\nxogreprerequisites.h(303) : error C2146: syntax error : missing ';' before identifier 'NxThrow'
c:\progging\nxogre\include\nxogreprerequisites.h(303) : error C2182: 'NxExport' : illegal use of type 'void'
c:\progging\nxogre\include\nxogreprerequisites.h(303) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogreprerequisites.h(316) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogreprerequisites.h(316) : error C2146: syntax error : missing ';' before identifier 'NxVec3Axis'
c:\progging\nxogre\include\nxogreprerequisites.h(316) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogreprerequisites.h(317) : error C2064: term does not evaluate to a function taking 3 arguments
c:\progging\nxogre\include\nxogreprerequisites.h(318) : error C2064: term does not evaluate to a function taking 3 arguments
c:\progging\nxogre\include\nxogreprerequisites.h(319) : error C2064: term does not evaluate to a function taking 3 arguments
c:\progging\nxogre\include\nxogreprerequisites.h(320) : error C2064: term does not evaluate to a function taking 3 arguments
c:\progging\nxogre\include\nxogreprerequisites.h(321) : error C2064: term does not evaluate to a function taking 3 arguments
c:\progging\nxogre\include\nxogreprerequisites.h(322) : error C2064: term does not evaluate to a function taking 3 arguments
c:\progging\nxogre\include\nxogreparams.h(28) : error C2470: 'Params' : looks like a function definition, but there is no parameter list; skipping apparent body
c:\progging\nxogre\include\nxogrephysxdriver.h(35) : error C2470: 'PhysXDriverParams' : looks like a function definition, but there is no parameter list; skipping apparent body
c:\progging\nxogre\include\nxogrephysxdriver.h(68) : error C2470: 'PhysXDriver' : looks like a function definition, but there is no parameter list; skipping apparent body
c:\progging\nxogre\include\nxogrecontainer.h(60) : error C2989: 'NxOgre::NxExport' : class template has already been declared as a non-class template
c:\progging\nxogre\include\nxogreparams.h(28) : see declaration of 'NxOgre::NxExport'
c:\progging\nxogre\include\nxogrecontainer.h(60) : error C2146: syntax error : missing ';' before identifier 'Container'
c:\progging\nxogre\include\nxogrecontainer.h(56) : error C3856: 'NxOgre': class is not a class template
c:\progging\nxogre\include\nxogrecontainer.h(60) : error C2470: 'Container' : looks like a function definition, but there is no parameter list; skipping apparent body
c:\progging\nxogre\include\nxogrecontainer.h(304) : error C2989: 'NxOgre::NxExport' : class template has already been declared as a non-class template
c:\progging\nxogre\include\nxogreparams.h(28) : see declaration of 'NxOgre::NxExport'
c:\progging\nxogre\include\nxogrecontainer.h(304) : error C2146: syntax error : missing ';' before identifier 'List'
c:\progging\nxogre\include\nxogrecontainer.h(303) : error C3856: 'NxOgre': class is not a class template
c:\progging\nxogre\include\nxogrecontainer.h(304) : error C2470: 'List' : looks like a function definition, but there is no parameter list; skipping apparent body
c:\progging\nxogre\include\nxogrecontainer.h(566) : fatal error C1506: unrecoverable block scoping error


Most errors happen because of this "NxExport" (which I don't know what it's for, too..). I'm quite sure that it isn't the code itself, but the project file... because in Visual Studio 2005 IDE, the compiler is pleased... probably I missed something; libs are all included, but what about build options and that stuff?

betajaen

13-11-2007 21:01:09

NxExport is a precompiler thingy to make the class exported/usable in the DLL, it's a Visual Studio thing.

Goto NxOgreStable.h, Goto around lines 135ish and comment the NxExport bits out. Replace it with:

#define NxExport

AnTeevY

13-11-2007 22:18:32

There is no NxExport stuff around 135?

I got:

102: # define NxExport __declspec(dllexport)
104: # define NxExport __declspec(dllimport)
117: # define NxExport

betajaen

13-11-2007 22:41:50

That's it. Just comment it out.

AnTeevY

14-11-2007 11:33:38

Commented those 3 lines out, no change.

Added #define NxExport somewhere between "#if defined WIN32" and "#if defined NX_LINUX", now I got waaaay more errors:

c:\progging\nxogre\include\nxogreprerequisites.h(245) : error C2065: 'NxActorGroup' : undeclared identifier
c:\progging\nxogre\include\nxogreprerequisites.h(256) : error C2065: 'NxDominanceGroup' : undeclared identifier
c:\progging\nxogre\include\nxogreprerequisites.h(268) : error C2065: 'NxMaterialIndex' : undeclared identifier
c:\progging\nxogre\include\nxogreprerequisites.h(273) : error C2065: 'NxCollisionGroup' : undeclared identifier
c:\progging\nxogre\include\nxogreprerequisites.h(317) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogreprerequisites.h(317) : error C2146: syntax error : missing ';' before identifier 'NxVec3Axis'
c:\progging\nxogre\include\nxogreprerequisites.h(317) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogreprerequisites.h(318) : error C2064: term does not evaluate to a function taking 3 arguments
c:\progging\nxogre\include\nxogreprerequisites.h(319) : error C2064: term does not evaluate to a function taking 3 arguments
c:\progging\nxogre\include\nxogreprerequisites.h(320) : error C2064: term does not evaluate to a function taking 3 arguments
c:\progging\nxogre\include\nxogreprerequisites.h(321) : error C2064: term does not evaluate to a function taking 3 arguments
c:\progging\nxogre\include\nxogreprerequisites.h(322) : error C2064: term does not evaluate to a function taking 3 arguments
c:\progging\nxogre\include\nxogreprerequisites.h(323) : error C2064: term does not evaluate to a function taking 3 arguments
c:\progging\nxogre\include\nxogreparams.h(47) : error C2061: syntax error : identifier 'NxMaterialIndex'
c:\progging\nxogre\include\nxogreparams.h(49) : error C2061: syntax error : identifier 'NxReal'
c:\progging\nxogre\include\nxogreparams.h(49) : error C2535: 'bool NxOgre::Params::Set(const NxOgre::NxString &,NxOgre::Params::Parameter &)' : member function already defined or declared
c:\progging\nxogre\include\nxogreparams.h(47) : see declaration of 'NxOgre::Params::Set'
c:\progging\nxogre\include\nxogreparams.h(50) : error C2061: syntax error : identifier 'NxVec3'
c:\progging\nxogre\include\nxogreparams.h(50) : error C2535: 'bool NxOgre::Params::Set(const NxOgre::NxString &,NxOgre::Params::Parameter &)' : member function already defined or declared
c:\progging\nxogre\include\nxogreparams.h(47) : see declaration of 'NxOgre::Params::Set'
c:\progging\nxogre\include\nxogreparams.h(51) : error C2061: syntax error : identifier 'NxQuat'
c:\progging\nxogre\include\nxogreparams.h(51) : error C2535: 'bool NxOgre::Params::Set(const NxOgre::NxString &,NxOgre::Params::Parameter &)' : member function already defined or declared
c:\progging\nxogre\include\nxogreparams.h(47) : see declaration of 'NxOgre::Params::Set'
c:\progging\nxogre\include\nxogreparams.h(55) : error C2061: syntax error : identifier 'NxHeightFieldAxis'
c:\progging\nxogre\include\nxogreparams.h(55) : error C2535: 'bool NxOgre::Params::Set(const NxOgre::NxString &,NxOgre::Params::Parameter &)' : member function already defined or declared
c:\progging\nxogre\include\nxogreparams.h(47) : see declaration of 'NxOgre::Params::Set'
c:\progging\nxogre\include\nxogrephysxdriver.h(75) : error C2143: syntax error : missing ';' before '*'
c:\progging\nxogre\include\nxogrephysxdriver.h(75) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogrephysxdriver.h(75) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogrephysxdriver.h(75) : warning C4183: 'getSDK': missing return type; assumed to be a member function returning 'int'
c:\progging\nxogre\include\nxogrephysxdriver.h(86) : error C2061: syntax error : identifier 'NxReal'
c:\progging\nxogre\include\nxogrephysxdriver.h(90) : error C2146: syntax error : missing ';' before identifier 'getTime'
c:\progging\nxogre\include\nxogrephysxdriver.h(90) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogrephysxdriver.h(90) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogrephysxdriver.h(90) : warning C4183: 'getTime': missing return type; assumed to be a member function returning 'int'
c:\progging\nxogre\include\nxogrephysxdriver.h(105) : error C2143: syntax error : missing ';' before '*'
c:\progging\nxogre\include\nxogrephysxdriver.h(105) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogrephysxdriver.h(105) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogrephysxdriver.h(110) : error C2146: syntax error : missing ';' before identifier 'mTime'
c:\progging\nxogre\include\nxogrephysxdriver.h(110) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogrephysxdriver.h(110) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogrephysxdriver.h(110) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogrephysxdriver.h(86) : error C2065: 'mTimeModifier' : undeclared identifier
c:\progging\nxogre\include\nxogrephysxdriver.h(86) : error C2065: 'modifier' : undeclared identifier
c:\progging\nxogre\include\nxogrephysxdriver.h(90) : error C2065: 'mTime' : undeclared identifier
c:\progging\nxogre\include\nxogreerror.h(45) : error C2146: syntax error : missing ';' before identifier 'second'
c:\progging\nxogre\include\nxogreerror.h(45) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogreerror.h(45) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogreactor.h(191) : error C2061: syntax error : identifier 'NxActorDesc'
c:\progging\nxogre\include\nxogreactor.h(192) : error C2061: syntax error : identifier 'NxBodyDesc'
c:\progging\nxogre\include\nxogreactor.h(200) : error C2143: syntax error : missing ';' before '*'
c:\progging\nxogre\include\nxogreactor.h(200) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogreactor.h(200) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogreactor.h(204) : error C2146: syntax error : missing ';' before identifier 'mDensity'
c:\progging\nxogre\include\nxogreactor.h(204) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\progging\nxogre\include\nxogreactor.h(204) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

... and more, but the limit is 50.

betajaen

14-11-2007 12:30:11

Stuff like this

c:\progging\nxogre\include\nxogrephysxdriver.h(86) : error C2061: syntax error : identifier 'NxReal'

Indicates that the PhysX headers aren't linked.

AnTeevY

14-11-2007 17:48:47

Don't ask me why, but I've just managed to import the VC8 solution file into CB without crash. Changed the compiler to Visual Studio 2005 and tried to build: Same errors as in VS2005 itself -> pasted your fixed allocator-files. Compiled again (expecting the "'NxOgre::UserAllocator' : no appropriate default constructor available" blah blah errors)), but there were only linker errors concerning the UserAllocator. Didn't really know what to do, so I fixed lines 79 and 88 in the physxdriver and character controller files... and voila: it works! :)

While compiling, I get millions of messages like this (and the compiling lasts about 5mins):

[
_FwdIt=Ogre::ParameterDef *,
_Iter=std::_Vector_const_iterator<Ogre::ParameterDef,std::allocator<Ogre::ParameterDef>>,
_Ty=Ogre::ParameterDef,
_InIt=std::_Vector_const_iterator<Ogre::ParameterDef,std::allocator<Ogre::ParameterDef>>,
_Alloc=std::allocator<Ogre::ParameterDef>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(490) : see reference to function template instantiation 'Ogre::ParameterDef *std::vector<_Ty>::_Ucopy<std::_Vector_const_iterator<_Ty,_Alloc>>(_Iter,_Iter,Ogre::ParameterDef *)' being compiled
with
[
_Ty=Ogre::ParameterDef,
_Alloc=std::allocator<Ogre::ParameterDef>,
_Iter=std::_Vector_const_iterator<Ogre::ParameterDef,std::allocator<Ogre::ParameterDef>>
]
C:\Program Files\Microsoft Visual Studio 8\VC\include\vector(485) : while compiling class template member function 'std::vector<_Ty>::vector(const std::vector<_Ty> &)'
with
[
_Ty=Ogre::ParameterDef
]


Would like to know what this is - but it's not important though, because it works anyway :)

Thank you for your help! *happy again*

Plague

17-11-2007 15:54:59

If you wouldn't mind making that code::blocks project you got to compile available somewhere... I think it would help the rest of us.

Then again, I have yet to attempt to compile everything myself. Lets try that first ;)

AnTeevY

17-11-2007 16:31:56

Okay, of course, I'll try to get it somewhere up tomorrow. At the moment I'm trying to make a CB project template (not a user template, but one that comes with a wizard like the other ones), but I've got some problems adding compiler flags (/MTd for example) to the wizard... do you know how that works? I looked up some other wizards, but I didn't find anything that could help me.

Plague

18-11-2007 21:21:38

Sorry, I have very little experience with programming, much less with Code Blocks. I tried googling Code Blocks Project Templates, but I'm afraid that's the extent of my knowledge on the subject... sorry...

I'm going to go try and get the nxOgre working with CodeBlocks on my machine.

Plague

18-11-2007 22:34:00

Alright, now I'm getting massive amounts of linker errors.

Linking dynamic library: \lib\NxOgre_d.dll
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5ActorC2ERKSsPNS_5SceneEPNS_14ShapeBlueprintERKNS_4PoseENS_11ActorParamsE':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:182: undefined reference to `NxOgre::NxCreateID(unsigned int, std::string)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5ActorC1ERKSsPNS_5SceneEPNS_14ShapeBlueprintERKNS_4PoseENS_11ActorParamsE':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:182: undefined reference to `NxOgre::NxCreateID(unsigned int, std::string)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor20getGlobalOrientationEv':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:426: undefined reference to `NxOgre::toQuaternion(NxQuat const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor20setGlobalOrientationERKN4Ogre10QuaternionE':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:432: undefined reference to `NxOgre::toNxQuat(Ogre::Quaternion const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor17getGlobalPositionEv':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:438: undefined reference to `NxOgre::toVector3(NxVec3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor17setGlobalPositionERKN4Ogre7Vector3E':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:444: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor18moveGlobalPositionERKN4Ogre7Vector3E':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:456: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor21moveGlobalOrientationERKN4Ogre10QuaternionE':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:462: undefined reference to `NxOgre::toNxQuat(Ogre::Quaternion const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor27setCMassOffsetLocalPositionERKN4Ogre7Vector3E':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:574: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor28setCMassOffsetGlobalPositionERKN4Ogre7Vector3E':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:599: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor22setCMassGlobalPositionERKN4Ogre7Vector3E':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:625: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZNK6NxOgre5Actor21getCMassLocalPositionEv':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:647: undefined reference to `NxOgre::toVector3(NxVec3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZNK6NxOgre5Actor24getCMassLocalOrientationEv':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:653: undefined reference to `NxOgre::toQuaternion(NxQuat const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZNK6NxOgre5Actor22getCMassGlobalPositionEv':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:667: undefined reference to `NxOgre::toVector3(NxVec3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZNK6NxOgre5Actor25getCMassGlobalOrientationEv':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:675: undefined reference to `NxOgre::toQuaternion(NxQuat const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor25setMassSpaceInertiaTensorERKN4Ogre7Vector3E':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:695: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZNK6NxOgre5Actor25getMassSpaceInertiaTensorEv':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:701: undefined reference to `NxOgre::toVector3(NxVec3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor17setLinearVelocityERKN4Ogre7Vector3E':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:761: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor18setAngularVelocityERKN4Ogre7Vector3E':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:767: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZNK6NxOgre5Actor17getLinearVelocityEv':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:774: undefined reference to `NxOgre::toVector3(NxVec3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZNK6NxOgre5Actor18getAngularVelocityEv':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:780: undefined reference to `NxOgre::toVector3(NxVec3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor17setLinearMomentumERKN4Ogre7Vector3E':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:811: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor18setAngularMomentumERKN4Ogre7Vector3E':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:817: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZNK6NxOgre5Actor17getLinearMomentumEv':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:823: undefined reference to `NxOgre::toVector3(NxVec3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZNK6NxOgre5Actor18getAngularMomentumEv':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:829: undefined reference to `NxOgre::toVector3(NxVec3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor13addForceAtPosERKN4Ogre7Vector3ES4_11NxForceModeb':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:835: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:835: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor18addForceAtLocalPosERKN4Ogre7Vector3ES4_11NxForceModeb':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:841: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:841: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZN6NxOgre5Actor18addLocalForceAtPosERKN4Ogre7Vector3ES4_11NxForceModeb':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:847: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o:C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:847: more undefined references to `NxOgre::toNxVec3(Ogre::Vector3 const&)' follow
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZNK6NxOgre5Actor16getPointVelocityERKN4Ogre7Vector3E':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:889: undefined reference to `NxOgre::toVector3(NxVec3 const&)'
\compiler\Windows\Debug\source\NxOgreActor.o: In function `ZNK6NxOgre5Actor21getLocalPointVelocityERKN4Ogre7Vector3E':
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:895: undefined reference to `NxOgre::toNxVec3(Ogre::Vector3 const&)'
C:/OgreSDK/nxOgre/source/NxOgreActor.cpp:895: undefined reference to `NxOgre::toVector3(NxVec3 const&)'


Just a small portion....

Should I try cleaning and rebuilding? I really don't know this code well enough to see what the problem is, but I literally can't find the .o libraries the linker is referencing in any of the files I've downloaded...

help :(

betajaen

18-11-2007 22:35:11

You guys are making me install Code::Blocks on my machine aren't you? ;)

Plague

18-11-2007 22:36:27

Not if you can help us without it :P

It's a nifty little program, as far as I can tell.

I'm still having those linker problems ;)

Plague

19-11-2007 03:23:34

I cleaned and rebuilt, still got the same errors.

AnTeevY

19-11-2007 15:56:53

I got a template ready. Just copy in into the NxOgre\compiler directory. I hope that works for you, if not, post your errors, maybe I recognize some of them ;)

http://chin-chillaz.de/NxOgre.VC8.Win32.cbp

Edit: I forgot something:
http://www.nxogre.org/NxOgreUserAllocator.cpp
http://www.nxogre.org/NxOgreUserAllocator.h
Replace the old ones with those and change

NxOgreCharacterController.cpp line 79 and
NxOgrePhysXDriver.cpp line 88 with
mAllocator = NxCreateAllocator("Character Controller");

betajaen

19-11-2007 17:33:32

Excellent. I would like this included in properly in NxOgre.

As I have to install Code::Blocks any suggestions/comments/hints of what I should do. I notice the "stable" is two years out of date, so I should use a nightly. I would do so, but I keep getting errors on the Berlios server.

Maybe tomorrow then. ;)

AnTeevY

19-11-2007 18:53:31

Yeah, use a Nightly.

I know the Berlios problem, so use these links (for the 15th November version, the newest one yet):
http://download2.berlios.de/codeblocks/ ... 9_win32.7z
http://download2.berlios.de/codeblocks/ ... _gcc421.7z
http://download2.berlios.de/codeblocks/ ... b_wx286.7z

Just unpack the CB folder and copy the two DLLs in it. After the first start a user folder is created somewhere in the Application Data folders in your Windows user profile folders (for me on Vista this is "C:\Users\MYUSERNAME\AppData\Roaming\codeblocks"). There your settings will be saved and you can add project templates and so and without harming the C::B files directly. And if you want to update to a newer Nightly, just replace the unpacked folder with the newer one.

AnTeevY

22-11-2007 19:55:11

I'd like to know whether the project file works for other guys than me, too :)

And I've got a new problem, too:
When building my own NxOgre-Project (a standard OGRE project with some NxOgre-PhysX included) in release-mode, it asks for "MSVCP80.dll" and "MSVCR80.dll". After including those, I get the R6034 Runtime Error. But since I'm not in VS2005, how to include the manifest stuff?! And isn't this a .NET-issue, and why works debug perfectly?

Edit: Pfft, luckily found that:
#pragma comment(linker, "\"/manifestdependency:type='Win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'\"")
Everything solved :)

AnTeevY

23-11-2007 16:05:02

I'm trying to compile the Cake examples in C::B with VC++2005 compiler. First, it does not find the OIS.h (because there is no OIS stuff in my VS2005 OGRE build?!), so I have to use those from the MinGW-OGRE folder?!
Then it compiles fine, but I got a veeeery suspicious linker error:
LINK: fatal error LNK1104: cannot open file 'Win32".obj'
Really looks like a spelling mistake? (['blah".bla'] can't be right).

In VS2005 itself it misses the OIS_d.lib... I don't have such a lib and I can't find a download link, too :(





Edit:
Right, I reinstalled Visual C++ OGRE SDK and now the OIS stuff is in it. Just compiled it in Visual Studio and everything works fine..... except:

Procedure entrance point(? "Prozedureinsprungspunkt" in German) "?updateCorners@AxisAlignedBox@Ogre@@IAEXXZ" was not found in "OgreMain.dll"
This error message appears when I try to execute the .exe.

Similar error with the debug exe:
"?op_del_sc@MemoryManager@Ogre@@AAEXPAXI@Z" and "OgreMain_d.dll"

This means my DLL is older/newer than the LIB, right? But that's impossible :(

Bah! :(


Edit2: Now the linker error in C::B (debug) is about "OgreMain_d.obj" and not the win32".obj anymore. Funnily, now the release linker needs the win32 thing. Before, debug linker needed it and in release mode I got over 50 strange errors.

Edit3: Hm, just installed PhysX 2.7.3. , reinstalled Ogre again and redownloaded NxOgre. Recompiled everything. Now both debug and release of the Cake in C::B wants the mysterious "win32.obj". And in VS2005, the debug version just crashes on start, but the release version works fine. Pfft, straaaaaange.

Plague

25-11-2007 03:44:16

I'd like to know whether the project file works for other guys than me, too :)

Nope.... I've switched to MSVC8 and it compiles, I'm having problems linking the PhysX libraries though... probably PEBKAC.

AnTeevY

25-11-2007 12:10:20

Could you post your errors here?

Plague

25-11-2007 15:39:44

They've been fixed, actually. Betajaen is the man.

I just wasn't linking to the correct libraries... :oops: Apparently it's not enough to just add the path, you also have to tell the linker what libraries you use. Silly me. :roll:

AnTeevY

25-11-2007 18:02:29

Hm okay, I gues I'm gonna leave NxOgre, it just won't work for me. Suddenly it does not run again (I did not change anything!). In debug mode, my NxOgre projects just crash after the Ogre Dialog. Between 20-30 trys, one of them ran fine. Oh it's just impossible and totally unlogically and I just give up now, after 2 weeks of trying.

Is there anything I could do? It's a simple crash and there's no error message I could google for, so I have no idea what I shall do now :( And is it very circuitous to use PhysX directly with Ogre without NxOgre?

Please answer :)

betajaen

25-11-2007 18:58:36

Have you at least tried NxOgre and your application in Visual Studio?

Using NxOgre in very strange ways in the last year, I've never had it crash randomly, if it crashes it crashes for a reason. That reason is very specific and usually it's an pointer being NULL, or an infinite loop.

Your using NxOgre and PhysX in an unsupported or untested way, it's at least possible it's unstable in such an environment or the application working with it.

AnTeevY

26-11-2007 17:03:54

Hm, same goes for VS2005 debug NxOgre projects as well as the Cake in debug mode. I've just recompiled the NxOgre_d.dll and lib without change. Could it be possible that that's an issue with 2.7.3? I'm installing 2.7.2 again now, hope that helps.

AnTeevY

26-11-2007 19:01:08

Installed 2.7.2, reinstalled OGRE, redownloaded NxOgre, recompiled the libs and dlls -> no change!?

I just can't find the reason for why it crashes :( Could somebody send me his NxOgre DLLs and LIBs he built? Or a Visual Studio 2005 project file for a simple project? Maybe there's my fault - although it DID work 2 days ago, and now, without changing anything, it does not :(

And why do I get the whole manifest-stuff only when my code contains NxOgre code?

Demicanadian

20-03-2008 20:59:15

it's supposed to be a topic about C::B, so I'll post a solution to this problem. There's no _asm in gcc, so you need to change these part:

#ifdef WIN32
NxF32 localCos, localSin;
NxF32 local = f;
_asm fld local
_asm fsincos
_asm fstp localCos
_asm fstp localSin
c = localCos;
s = localSin;
#else


to:

#ifdef WIN32
NxF32 localCos, localSin;
NxF32 local = f;
_asm fld local
_asm fsincos
_asm fstp localCos
_asm fstp localSin
c = localCos;
s = localSin;
#else

Demicanadian

20-03-2008 21:03:14

then, if there's an error in NxOgreTrigger.h, change

#if (NX_USE_CHARACTER_API == 1)
CEnterPtr(CEnter), CLeavePtr(CLeave), CInsidePtr(CInside)
#endif


to

#if (NX_USE_CHARACTER_API == 1)
,CEnterPtr(CEnter), CLeavePtr(CLeave), CInsidePtr(CInside)
#endif

Demicanadian

20-03-2008 21:06:32

and then, in my case, there's an error with NxOgreSimpleShape.h, but I'm not shure what should I do with

..\include\NxOgreSimpleShape.h|74|error: class `NxOgre::SimplePlane' is implicitly friends with itself|

betajaen

20-03-2008 21:15:35

Fixed, and your Trigger bug doesn't apply to Bleeding.