marc_antoine
14-11-2009 06:36:25
Ok, this would be like the second thing to do after the first guide I wrote “Guide To compile OgreNewt 2” (http://www.ogre3d.org/addonforums/viewtopic.php?f=4&t=11510) where westPointer helped a lot pointing some issues he got and posting his solutions.. ..
This guide is focused to compile the Demos without CMake so you have a more real grasp of how to setup your projects which already have a lot of code in it.
Note: everything I’ve done is based in the following specs:
* Ogre SDK 1.62
* Newton SDK 2.10
* OgreNewt 2 SVN version
* VC++ Express 2008
And prior to even start with this guide please make sure you have successfully compiled the ogreNewt libs and dll’s ok now let’s get started.
1.-Creating an empty project
2.-Adding the SVN demos
3.-creating the project for each demo
4.-configuring VC++ Express
5.-Configuring the project
1.-Creating an empty project
Because VC++ express 2008 doesn’t allow you to create an empty solution, we have to create an empty project, shame on you Microsoft!..lol, ok first create an empty win32 project, i created mine in "c:\" with the name "ogreNewtonDemos” and checked the option "create Directory for solution" then hit "ok"
now you'll be presented to choose the type of project and some additional options, please select "windows application" and "Empty Project", then hit the "Finish Botton"
In the Solution Explorer you will have a project named “ogreNewtonDemos” right click it and from the popup menu, select “Remove”, from the confirmation dialogue select “OK” and then click in the “Save All” icon of the toolbar.
Now go to the solution Directory and inside you'll find another folder with the name of project e have just removed fromt he solution, please delete it.
2.-Adding the SVN demos
From the ogreNewt SVN folder you checked out look for the demos folder, inside you will find folders for each demo, a folder named “media” and a folder named “tinyxml” in total you should copy 10 folders into the solution Directory.
3.-creating the project for each demo
I know this seems like too much work to do, but I think it is the most didactical way of doing it hehe at least without CMake… .. ok now.
In the solution Explorer "right click" the solution name and choose "add new Project" and give it the exact name that has the folder for the Demo, I.E Demo #1 has the name “Demo01_TheBasics”, name like this the project and hit “OK”, then hit “Next” to set it as a windows application and as an empty project finally click on finish.
In the solution explorer toggle the "show all files" option, and you will see the source code for the demo.. select all the files except for “CMakeLists.txt” and then right click over the selected files, choose the option “include in the project” and toggle off the option to show all files.
4.-configuring VC++ Express
I like to do this in the IDE options, because if you are creating test projects or something with ogre newt, instead of setting them in the project everytime you set them once in the IDE so this is up to you.. for this guide I’m going to set them in the IDE properties so go to:
Tools-->Options-->Project Solutions-->VC++ Directories
You’ll be displayed with some settings at your right hand, in the upper right corner there is a label with the title “Show Directories For” and a comboBox, we are interested in 3 options from there:
Include files
Library files
Source files
For each option add the path to the corresponding files here is my configuration:
Include paths:
C:\Newton_Physics\ogreNewt20\inc
C:\Newton_Physics\newton210\sdk
C:\Newton_Physics\boost_1_40_0\boost_1_40_0
c:\OgreSDK\samples\include
c:\OgreSDK\include
Lib Paths:
C:\Newton_Physics\ogreNewt20Build\Release or C:\Newton_Physics\ogreNewt20Build\Debug, depending on your configuration.
C:\Newton_Physics\newton210\sdk\x32\dll_vs9
C:\Newton_Physics\ogreNewt20\src
c:\OgreSDK\lib
Source Paths
C:\Newton_Physics\ogreNewt20\src
5.-Configuring the project
Finally to configure the project, we only hav to add the libs we are going to use in the project, for this we need to go to "project properties"-->"Configuration Properties"-->"Linker"-->"input" -->"Additional Dependencies" and add the following lib´s: OgreMain.lib OIS.lib OgreNewt.lib newton.lib
Now compile the solution or the project, and that’s it.. ..
1>Linking...
1>Generating code
1>Finished generating code
1>Embedding manifest...
1>Build log was saved at "file://c:\ogreNewtonDemos\Demo01_TheBasics\Release\BuildLog.htm"
1>Demo01_TheBasics - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Remember to copy the newton and ogrenewt dll’s, to point the resources.cfg to the media directory we copied from the SVN and to copy the files from the Release or Debug (depending of the kind of compilation you are doing) of the OGRE SDK, since wee need those dll's and stuff... basically by this point you should know how to setup the resources the app needs.....
to add the next demo to our solution we repeat steps 3 and 5, and that's it..for some demos you should add some other libraries i.E CEGUI, hope this gives you a general idea of how or where to add the libraries and stuff needed by newton and ogreNewt.... suggestions and ideas to add into the guide are welcome.
cheers.!!
here is a screenshot of the Demo in action.
[attachment=0]Demo01_The Basics.jpg[/attachment]
This guide is focused to compile the Demos without CMake so you have a more real grasp of how to setup your projects which already have a lot of code in it.
Note: everything I’ve done is based in the following specs:
* Ogre SDK 1.62
* Newton SDK 2.10
* OgreNewt 2 SVN version
* VC++ Express 2008
And prior to even start with this guide please make sure you have successfully compiled the ogreNewt libs and dll’s ok now let’s get started.
1.-Creating an empty project
2.-Adding the SVN demos
3.-creating the project for each demo
4.-configuring VC++ Express
5.-Configuring the project
1.-Creating an empty project
Because VC++ express 2008 doesn’t allow you to create an empty solution, we have to create an empty project, shame on you Microsoft!..lol, ok first create an empty win32 project, i created mine in "c:\" with the name "ogreNewtonDemos” and checked the option "create Directory for solution" then hit "ok"
now you'll be presented to choose the type of project and some additional options, please select "windows application" and "Empty Project", then hit the "Finish Botton"
In the Solution Explorer you will have a project named “ogreNewtonDemos” right click it and from the popup menu, select “Remove”, from the confirmation dialogue select “OK” and then click in the “Save All” icon of the toolbar.
Now go to the solution Directory and inside you'll find another folder with the name of project e have just removed fromt he solution, please delete it.
2.-Adding the SVN demos
From the ogreNewt SVN folder you checked out look for the demos folder, inside you will find folders for each demo, a folder named “media” and a folder named “tinyxml” in total you should copy 10 folders into the solution Directory.
3.-creating the project for each demo
I know this seems like too much work to do, but I think it is the most didactical way of doing it hehe at least without CMake… .. ok now.
In the solution Explorer "right click" the solution name and choose "add new Project" and give it the exact name that has the folder for the Demo, I.E Demo #1 has the name “Demo01_TheBasics”, name like this the project and hit “OK”, then hit “Next” to set it as a windows application and as an empty project finally click on finish.
In the solution explorer toggle the "show all files" option, and you will see the source code for the demo.. select all the files except for “CMakeLists.txt” and then right click over the selected files, choose the option “include in the project” and toggle off the option to show all files.
4.-configuring VC++ Express
I like to do this in the IDE options, because if you are creating test projects or something with ogre newt, instead of setting them in the project everytime you set them once in the IDE so this is up to you.. for this guide I’m going to set them in the IDE properties so go to:
Tools-->Options-->Project Solutions-->VC++ Directories
You’ll be displayed with some settings at your right hand, in the upper right corner there is a label with the title “Show Directories For” and a comboBox, we are interested in 3 options from there:
Include files
Library files
Source files
For each option add the path to the corresponding files here is my configuration:
Include paths:
C:\Newton_Physics\ogreNewt20\inc
C:\Newton_Physics\newton210\sdk
C:\Newton_Physics\boost_1_40_0\boost_1_40_0
c:\OgreSDK\samples\include
c:\OgreSDK\include
Lib Paths:
C:\Newton_Physics\ogreNewt20Build\Release or C:\Newton_Physics\ogreNewt20Build\Debug, depending on your configuration.
C:\Newton_Physics\newton210\sdk\x32\dll_vs9
C:\Newton_Physics\ogreNewt20\src
c:\OgreSDK\lib
Source Paths
C:\Newton_Physics\ogreNewt20\src
5.-Configuring the project
Finally to configure the project, we only hav to add the libs we are going to use in the project, for this we need to go to "project properties"-->"Configuration Properties"-->"Linker"-->"input" -->"Additional Dependencies" and add the following lib´s: OgreMain.lib OIS.lib OgreNewt.lib newton.lib
Now compile the solution or the project, and that’s it.. ..
1>Linking...
1>Generating code
1>Finished generating code
1>Embedding manifest...
1>Build log was saved at "file://c:\ogreNewtonDemos\Demo01_TheBasics\Release\BuildLog.htm"
1>Demo01_TheBasics - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Remember to copy the newton and ogrenewt dll’s, to point the resources.cfg to the media directory we copied from the SVN and to copy the files from the Release or Debug (depending of the kind of compilation you are doing) of the OGRE SDK, since wee need those dll's and stuff... basically by this point you should know how to setup the resources the app needs.....
to add the next demo to our solution we repeat steps 3 and 5, and that's it..for some demos you should add some other libraries i.E CEGUI, hope this gives you a general idea of how or where to add the libraries and stuff needed by newton and ogreNewt.... suggestions and ideas to add into the guide are welcome.
cheers.!!
here is a screenshot of the Demo in action.
[attachment=0]Demo01_The Basics.jpg[/attachment]