Compiling iPhysics/Newton

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
joshua1091
Posts: 23
Joined: Thu Aug 09, 2007 5:16 pm

Compiling iPhysics/Newton

Post by joshua1091 »

it has taken me two days...and finally by god's grace...i learned how to do the compilation work to generate the dll and .a file...
chances are that there could be some others out there who could not get their iphysics to work bcos they dnt know how to recompile it....
so here is step by step instruction...
i downloaded the iphysics package two days ago
i had to recompile it for use with irrlicht 1.4
i used dev cpp,
the package didnt have the lib and dll files for integration with irrlicht...the provided lib file was flawed...
to get "IPhysics.a" file
open devcpp
goto file->new->project
select "static library"
name your project "IPhysics" or so
click ok
select the folder you want to save your project to(here on we will refer this as "project folder")
copy the following files to the project folder:
-include folder from the irrlicht version
-sdk folder from newton
-include folder from IPhysics
(in my case i renamed the three folders to include,newtoninclude,iphysicsnclude because i use them the sameway in irrlicht project....may be theyll work even when the contents are all under same folder)
-dll file from irrlicht
-dll file from newton
-".a" file from irrlicht
-".lib" file from newton
now goto project->options->parameters
click "add library or object"
select the .lib and .a files from the project folder
now click "directories" tab of the same window
now click "include directories" tab
click image button to right of bottom text box and select the "irrlicht include" folder
then click add
similarly add "newton and iphysics include" folders
click ok
compile the project
you will get "IPhysics.a" or "Projectname.a" file
to get "IPhysics.dll" file
open devcpp
goto file->new->project
select "DLL"
name your project "IPhysics" or so
click ok
select the folder you want to save your project to(here on we will refer this as "project folder")
copy the following files to the project folder:
-include folder from the irrlicht version
-sdk folder from newton
-include folder from IPhysics
(in my case i renamed the three folders to include,newtoninclude,iphysicsnclude because i use them the sameway in irrlicht project....may be theyll work even when the contents are all under same folder)
-dll file from irrlicht
-dll file from newton
-".a" file from irrlicht
-".lib" file from newton
-".a" file got from previous step
now goto project->options->parameters
click "add library or object"
select the .lib and .a files from the project folder
now click "directories" tab of the same window
now click "include directories" tab
click image button to right of bottom text box and select the "irrlicht include" folder
then click add
similarly add "newton and iphysics include" folders
click ok
compile the project
you will get "IPhysics.dll and libIPhysics.a" or "Projectname.dll and lib<project name>.a" file
now to use IPhysics in yor project just include along with other files
-iphysics include folder
-libIPhysics.a
-IPhysics.a
and link them appropriately...
i just saw this problem...when i link "lib" and "a" files under parameters tab of my project the project compiles successfully only when they are in the order
IPhysics.a
libIPhysics.a
libIrrlicht.a
Newton.lib
else i get compilation errors...

may be something like invocation before declaration
[/list]
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

The Power of Christ compels you to put "Newton" in your title!
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Post Reply