[Need Project File] Code::Blocks

PCosmin89

24-02-2007 09:38:19

Hello everyone, I'm trying to set up my Code :: Blocks to work with Newton and OgreNewt for a day, I haven't reached any good result, could any of you supply me with a project file ?

One where all the linker files are set and directories ?

I could change them after to -> to the directories in my computer, but I just can't figure out the settings I should use at Build Options !

Please help me !

Game_Ender

24-02-2007 20:46:19

Have you tried importing the VS 2005 project files? They should give you a good start.

PCosmin89

25-02-2007 09:29:53

Yes, I tried to do that, gives me an error when importing ...

Game_Ender

25-02-2007 15:31:01

Have you made an Ogre project? Once you have a working Ogre project you only have to add 3 more things to it to use OgreNewt:
  1. Add the folder which contains the OgreNewt libraries to the linker path[/*:m]
  2. Add the OgreNewt library to the link libraries list[/*:m]
  3. Add the OgreNewt include folder to list of include directories[/*:m][/list:u]

walaber

25-02-2007 15:55:57

and don't forget to point the linker at the NewtonSDK as well.

PCosmin89

25-02-2007 22:28:42

I did that, but it has alot of errors, damn, anyway, thanks for trying to help me guys, I'm giving up AGAIN on physics :sigh:

Good Luck

Game_Ender

25-02-2007 23:30:33

Don't give up. You didn't even post your errors, and you didn't tell us whether you managed to build and run an Ogre project. First show us the errors. Second did you use the same complier for all parts? If you are using the Ogre MinGW SDK you need to compile OgreNewt and your project with MingG as well.

PCosmin89

26-02-2007 23:17:25

Yes, I managed to run an ogre project, loaded up all the meshes, terrain, well, everything I need...

There are alot of errors, I can't give them all :)


D:\Programe\CodeBlocks\OgreSDK\ogreaddons\OgreNewt\OgreNewt_Main\inc\OgreNewt_BasicFrameListener.h:9: OIS/OIS.h: No such file or directory
D:\Programe\CodeBlocks\OgreSDK\ogreaddons\OgreNewt\OgreNewt_Main\inc\OgreNewt_BasicFrameListener.h:37: error: `OIS' has not been declared
D:\Programe\CodeBlocks\OgreSDK\ogreaddons\OgreNewt\OgreNewt_Main\inc\OgreNewt_BasicFrameListener.h:37: error: ISO C++ forbids declaration of `InputManager' with no type
D:\Programe\CodeBlocks\OgreSDK\ogreaddons\OgreNewt\OgreNewt_Main\inc\OgreNewt_BasicFrameListener.h:37: error: expected `;' before '*' token
D:\Programe\CodeBlocks\OgreSDK\ogreaddons\OgreNewt\OgreNewt_Main\inc\OgreNewt_BasicFrameListener.h:38: error: `OIS' has not been declared
D:\Programe\CodeBlocks\OgreSDK\ogreaddons\OgreNewt\OgreNewt_Main\inc\OgreNewt_BasicFrameListener.h:38: error: ISO C++ forbids declaration of `Keyboard' with no type
D:\Programe\CodeBlocks\OgreSDK\ogreaddons\OgreNewt\OgreNewt_Main\inc\OgreNewt_BasicFrameListener.h:38: error: expected `;' before '*' token
C:\Documents and Settings\Cos\My Documents\My Programs\ADFSDFF\main.cpp:20: warning: cannot pass objects of non-POD type `struct Ogre::String' through `...'; call will abort at runtime
C:\Documents and Settings\Cos\My Documents\My Programs\ADFSDFF\main.cpp:20: warning: format argument is not a pointer (arg 2)
:: === Build finished: 7 errors, 2 warnings ===


^
The errors I get... I don't understand the OIS one ! I used my project options and added the directory where OIS.h is ...

PCosmin89

26-02-2007 23:21:11

I have no idea what I just did, messed with build options (set them to VC++, then back to GCC) and now it gives me 1 error and 2 warnings :)


C:\Documents and Settings\Cos\My Documents\My Programs\ADFSDFF\OgreNewtApplication.cpp:122: error: no matching function for call to `OgreNewt::BasicFrameListener::BasicFrameListener(Ogre::RenderWindow*&, Ogre::Camera*&, Ogre::SceneManager*&, OgreNewt::World*&, int)'
D:\Programe\CodeBlocks\OgreSDK\ogreaddons\OgreNewt\OgreNewt_Main\inc\OgreNewt_BasicFrameListener.h:21: note: candidates are: OgreNewt::BasicFrameListener::BasicFrameListener(const OgreNewt::BasicFrameListener&)
D:\Programe\CodeBlocks\OgreSDK\ogreaddons\OgreNewt\OgreNewt_Main\inc\OgreNewt_BasicFrameListener.h:30: note: OgreNewt::BasicFrameListener::BasicFrameListener(Ogre::RenderWindow*, Ogre::SceneManager*, OgreNewt::World*, int)
:: === Build finished: 3 errors, 2 warnings ===

Apouche

09-03-2007 03:41:54

well I'm not sure if that's the problem but you should have different frame listeners. One for the Application and one for Newton. And they both have different constructor. The one of your Application is specific to your application but the one of Newton shouldn't be changed.
Here is an example of a typical createFrameListener function in your main application.
mFrameListener = new MyExampleFrameListener(mWindow, mCamera, mSceneMgr, ... arguments); // Creates Frame Listener
mRoot->addFrameListener(mFrameListener);

m_pNewtonListener = new OgreNewt::BasicFrameListener( mWindow, mSceneMgr, m_pWorld, 60 );
mRoot->addFrameListener(m_pNewtonListener);

Hope that helps