A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by zenframe » Sun Mar 09, 2014 8:33 pm
I'm interested in using newton along with free pascal and SDL for a simple project I've been working on.
I've downloaded the .pas header files and the SDK but am unable to compile the SDK using CMake 2.8.12 GUI. It throws out the following errors
- Code: Select all
CMake Error at packages/CMakeLists.txt:11 (add_subdirectory):
The source directory
C:/Users/Chris/My Programs/_Lazarus Packages/newton-dynamics-3.11/packages/dAILibrary
does not contain a CMakeLists.txt file.
CMake Error at packages/CMakeLists.txt:12 (add_subdirectory):
The source directory
C:/Users/Chris/My Programs/_Lazarus Packages/newton-dynamics-3.11/packages/dAnimation
does not contain a CMakeLists.txt file.
CMake Error at packages/CMakeLists.txt:13 (add_subdirectory):
The source directory
C:/Users/Chris/My Programs/_Lazarus Packages/newton-dynamics-3.11/packages/dContainers
does not contain a CMakeLists.txt file.
CMake Error at packages/CMakeLists.txt:14 (add_subdirectory):
The source directory
C:/Users/Chris/My Programs/_Lazarus Packages/newton-dynamics-3.11/packages/dCustomJoints
does not contain a CMakeLists.txt file.
CMake Error at packages/CMakeLists.txt:16 (add_subdirectory):
The source directory
C:/Users/Chris/My Programs/_Lazarus Packages/newton-dynamics-3.11/packages/dNewton
does not contain a CMakeLists.txt file.
CMake Error at packages/CMakeLists.txt:17 (add_subdirectory):
The source directory
C:/Users/Chris/My Programs/_Lazarus Packages/newton-dynamics-3.11/packages/dScene
does not contain a CMakeLists.txt file.
Can someone provide me with a link to instructions on how to compile the library? All I want is the dll so I can do some testing! I've had a look through the folders and can't find it. Are there any documents provided? I can see there is an extensive set of tutorials, but I can't do much with them atm.
-
zenframe
-
- Posts: 3
- Joined: Sun Mar 09, 2014 7:48 pm
by AntonSynytsia » Mon Mar 10, 2014 5:14 am
First, you might want to get the latest newton version 3.12. It is accessible here:
http://newton-dynamics.googlecode.com/svn/trunk/How to download?On windows, I use TortoiseSVN, do the following:
- Install TortoiseSVN.
- Go to your documents and create new folder NewtonDynamics.
- Right click the folder and select SVN Checkout...
- Set URL of Repository to http://newton-dynamics.googlecode.com/svn/trunk/
- I'm pretty sure you can exclude certain files from downloading, but I'm not quite sure which are not required to compile the newton.dll.
Downloading everything will ensure that you won't have to download anything in the future 
- Click OK! -- Note it will take a while to download all that stuff. Make a cup of tea.
- Now, once you downloaded you can simply right click on the NewtonDynamics folder and select SVN Update.
This will ensure that the project is up to date.
Some people, update every other day.
Compiling- Navigate to .../NewtonDynamics/applications/demosSandbox/projects/visualStudio_20xx/ and open demosSandbox.sln.
- Choose your compiling type: In this case it will be releaseDll -- Win32/x64

- choose type.png (8.46 KiB) Viewed 4697 times
- Now, navigate to solution explorer
- To compile newton, select the solution and press build.

- build newton only.png (11.94 KiB) Viewed 4694 times
- Navigate to NewtonDynamics\coreLibrary_300\projects\windows\project_vs20xx\(Win32 or 64)\newton\releaseDll\ and there you'll find the gem! -- newton.dll
Compiling without ThreadsSome applications don't support multi-threading. Do the following to make Newton compatible with the application:
- Navigate to ../NewtonDynamics/coreLibrary_300/source/core/ and open dgThread.h.
- Scroll down to line 27 and uncomments #define DG_USE_THREAD_EMULATION. It should look like this:
- Code: Select all
// by default newton is run on a separate thread, optionally concurrent with the calling thread, it also uses a thread job pool for multi core systems.
// define DG_USE_THREAD_EMULATION on the command line for platform that do not support hardware multi threading or if multi threading is not stable
#define DG_USE_THREAD_EMULATION
- Save and recompile
Documentation, Usage, and TutorialsThe documention for 3.12 is i long way I guess, but there are a bunch of tutorials already. Here is where you can find the demos:
- \NewtonDynamics\applications\demosSandbox\sdkDemos\
- \NewtonDynamics\applications\tutorialsSDK300\
-
AntonSynytsia
-
- Posts: 193
- Joined: Sat Dec 28, 2013 6:36 pm
by zenframe » Mon Mar 10, 2014 8:24 am
Thats brilliant, I managed to find a version of newton.dll from 2006 which was suitable for testing a few files I downloaded from the web. I'll try and get it working tonight and let you know how I get on.
I'm building a 2d game, is Newton suitable for simulating simple physics across just 2 planes or is it going to be overkill. I've used Box2d in the past and thought Newton would be a perfect replacement, but it does so much more.
Thanks for the tutorial links they'll come in very useful

-
zenframe
-
- Posts: 3
- Joined: Sun Mar 09, 2014 7:48 pm
by AntonSynytsia » Mon Mar 10, 2014 11:52 am
If you wan't me I can compile newton 3.12 for you.
Just fill out this q's and I'll post the dll.
- Win32 or Win64?
- releaseDll, or debugDll?
- Is your application stable with multi threading?
-
AntonSynytsia
-
- Posts: 193
- Joined: Sat Dec 28, 2013 6:36 pm
by zenframe » Mon Mar 10, 2014 2:38 pm
Appreciate the offer Anton, but I'd like to sort it out myself

Am sure I'll have lots of other favours to ask of this board if I go ahead.
AntonSynytsia wrote:If you wan't me I can compile newton 3.12 for you.
Just fill out this q's and I'll post the dll.
- Win32 or Win64?
- releaseDll, or debugDll?
- Is your application stable with multi threading?
-
zenframe
-
- Posts: 3
- Joined: Sun Mar 09, 2014 7:48 pm
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 2 guests