Installation - Cannot compile newton dynamics 3.11

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Installation - Cannot compile newton dynamics 3.11

Postby 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

Re: Installation - Cannot compile newton dynamics 3.11

Postby 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:
  1. Install TortoiseSVN.
  2. Go to your documents and create new folder NewtonDynamics.
  3. Right click the folder and select SVN Checkout...
  4. Set URL of Repository to http://newton-dynamics.googlecode.com/svn/trunk/
  5. 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 :mrgreen:
  6. Click OK! -- Note it will take a while to download all that stuff. Make a cup of tea.
  7. 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. :roll:

Compiling
  1. Navigate to .../NewtonDynamics/applications/demosSandbox/projects/visualStudio_20xx/ and open demosSandbox.sln.
  2. Choose your compiling type: In this case it will be releaseDll -- Win32/x64
    choose type.png
    choose type.png (8.46 KiB) Viewed 4697 times
  3. Now, navigate to solution explorer
  4. To compile newton, select the solution and press build.
    build newton only.png
    build newton only.png (11.94 KiB) Viewed 4694 times
  5. 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 Threads
Some applications don't support multi-threading. Do the following to make Newton compatible with the application:
  1. Navigate to ../NewtonDynamics/coreLibrary_300/source/core/ and open dgThread.h.
  2. 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
  3. Save and recompile

Documentation, Usage, and Tutorials
The 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

Re: Installation - Cannot compile newton dynamics 3.11

Postby 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

Re: Installation - Cannot compile newton dynamics 3.11

Postby 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.
  1. Win32 or Win64?
  2. releaseDll, or debugDll?
  3. Is your application stable with multi threading?
AntonSynytsia
 
Posts: 193
Joined: Sat Dec 28, 2013 6:36 pm

Re: Installation - Cannot compile newton dynamics 3.11

Postby 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.
  1. Win32 or Win64?
  2. releaseDll, or debugDll?
  3. 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

cron