How to compile the Tutorials?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

How to compile the Tutorials?

Postby Marc » Mon Apr 09, 2012 12:05 pm

Hi !

I'm still trying to start working with newton300. I posted about my previous experience in compiling it here http://newtondynamics.com/forum/viewtopic.php?f=9&t=7153.

I also treid compiling the tutorials, but I have some trouble with it. I checked out the current svn.

I think dJointLibraray already requires core300, for example it uses NewtonDestroyCollision() instead of NewtonReleaseCollision. While doing so, it includes the Newton.h file which lies in the packages dir. But that is a copy of the core2xx newton.h and therefore, it doesn't compile. replacing it with the 300 newton.h fixes that.

Compiling the actual tutorials is more complicated. They still require Newton2xx, because it uses the old functions. I was able to fix it, but some things I'm not sure about. For example. what is the new updatemode paramter of NewtonUpdate() ? I just put a 0 there ...

After that, I can't get rid of these

Code: Select all
1>main.obj : error LNK2019: unresolved external symbol __imp__NewtonDestroy referenced in function "void __cdecl ShutDown(void)" (?ShutDown@@YAXXZ)
1>main.obj : error LNK2019: unresolved external symbol __imp__NewtonDestroyAllBodies referenced in function "void __cdecl ShutDown(void)" (?ShutDown@@YAXXZ)
1>main.obj : error LNK2019: unresolved external symbol __imp__NewtonUpdate referenced in function "void __cdecl AdvanceSimulation(int)" (?AdvanceSimulation@@YAXH@Z)
1>main.obj : error LNK2019: unresolved external symbol __imp__NewtonSetSolverModel referenced in function _SDL_main
1>main.obj : error LNK2019: unresolved external symbol __imp__NewtonSetPlatformArchitecture referenced in function _SDL_main
1>main.obj : error LNK2019: unresolved external symbol __imp__NewtonCreate referenced in function _SDL_main
1>main.obj : error LNK2019: unresolved external symbol __imp__NewtonSetMemorySystem referenced in function _SDL_main
1>../Win32/Tutorial_101_GettingStarted/Release\Tutorial_101_GettingStarted.exe : fatal error LNK1120: 7 unresolved externals


That's just from the 101 tutorial, the rest is similar. I tried adding newton.lib to the list of things to link with manually but it doesn't change a thing. Any idea how to fix this?
Millenium Project Enterprises - Hobbyist Gamedev Group http://www.mpe-online.org
Walkover is now on Steam => http://store.steampowered.com/app/348700/
User avatar
Marc
 
Posts: 281
Joined: Sun Mar 14, 2004 4:07 pm
Location: Germany

Re: How to compile the Tutorials?

Postby Julio Jerez » Mon Apr 09, 2012 2:13 pm

Now I have to separate core 200, form core 300
I have not done yet, because I am trying to get the GCC build.

this pass weekend I managed to build it in debug mode, but I am having problem with inline.
I also rewrote the thread class so that It work for both Linux amd VS.
as soon as I finish the Linux build, I will separate the two cores and put two independ archives in google source.

sorry about that.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: How to compile the Tutorials?

Postby Marc » Tue Apr 10, 2012 12:30 pm

I got rid of that linking error by replacing _NEWTON_USE_LIB with _NEWTON_STATIC_LIB. I got the hint here http://stackoverflow.com/questions/3704 ... -but-shoul even though that's related to mingw somehow.

While I got the tutorials to compile that way, some work, some don't. tutorial101 works, I see 2 boxes with faces on them. However, I also tried the player controller, and it just crashes in CreateMeshCollision() called from Entity.h line 235 with "Unhandled exception at 0x770b15de in Tutorial_202_PlayerController.exe: 0xC0000005: Access violation reading location 0x3f800004."

I'll wait and try again in a few weeks then :)
Millenium Project Enterprises - Hobbyist Gamedev Group http://www.mpe-online.org
Walkover is now on Steam => http://store.steampowered.com/app/348700/
User avatar
Marc
 
Posts: 281
Joined: Sun Mar 14, 2004 4:07 pm
Location: Germany


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest