[Win/Linux] Compiling NGD svn

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

[Win/Linux] Compiling NGD svn

Postby Kjow » Tue Sep 13, 2011 8:31 am

Hi all,

I would ask which is the best way to compile releaseDll for NGD svn.

For Windows:

I downloaded free Visual Studio 2008 express,
opened "...\newton-dynamics-read-only\packages\projects\visualStudio_2008\build.sln"
selected "releaseDll" and compiled.

OK, it has built both newton/joint libs and they works right.

___

For Linux (Ubuntu 11.04 x86):

cd ~/Desktop/newton-dynamics-read-only/coreLibrary_200/projets/linux32
make clean
make

and it produces libNewton.a + libNewton.so (but not Joint, etc), so I compiled manually:

cd ~/Desktop/newton-dynamics-read-only/packages/projects/linux32/dContainers
make
.../dCustomJoints
make
.../dMath
make
.../dScene
make
.../thirdParty
make

so now I have:

~/Desktop/newton-dynamics-read-only/packages/linux32$ ls
libdContainers.a libdMath.a libNewton.a Newton.h
libdJointLibrary.a libdScene.a libNewton.so

I copied all *.a to /usr/lib/

but when I try to compile a project I get error:

Code: Select all
...
...
Target OS: Linux for i386
Compiling lazarus.pp
Assembling lazarus
Compiling resource ../units/i386-linux/lazarus.or
Linking ../lazarus
/usr/bin/ld: warning: ../link.res contains output sections; did you forget -T?
/usr/lib/libdJointLibrary.a(NewtonCustomJoint.o): In function `NewtonCustomJoint::CalculateLocalMatrix(dMatrix const&, dMatrix&, dMatrix&) const':
(.text+0x408): undefined reference to `dMatrix::Inverse() const'
/usr/lib/libdJointLibrary.a(NewtonCustomJoint.o): In function `NewtonCustomJoint::CalculateLocalMatrix(dMatrix const&, dMatrix&, dMatrix&) const':
(.text+0x424): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(NewtonCustomJoint.o): In function `NewtonCustomJoint::CalculateLocalMatrix(dMatrix const&, dMatrix&, dMatrix&) const':
(.text+0x4ce): undefined reference to `dMatrix::Inverse() const'
/usr/lib/libdJointLibrary.a(NewtonCustomJoint.o): In function `NewtonCustomJoint::CalculateLocalMatrix(dMatrix const&, dMatrix&, dMatrix&) const':
(.text+0x4e4): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(NewtonCustomJoint.o): In function `NewtonCustomJoint::CalculateGlobalMatrix(dMatrix const&, dMatrix const&, dMatrix&, dMatrix&) const':
(.text+0x66a): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(NewtonCustomJoint.o): In function `NewtonCustomJoint::CalculateGlobalMatrix(dMatrix const&, dMatrix const&, dMatrix&, dMatrix&) const':
(.text+0x715): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(CustomBallAndSocket.o): In function `CustomLimitBallAndSocket::SubmitConstraints(float, int)':
(.text+0xc1e): undefined reference to `dQuaternion::UnrotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomHinge.o): In function `CustomHinge::GetPinAxis() const':
(.text+0xc96): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomPlayerController.o): In function `CustomPlayerController::CustomPlayerController(dMatrix const&, NewtonBody const*, float, float)':
(.text+0x8c5): undefined reference to `dMatrix::TransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomPlayerController.o): In function `CustomPlayerController::CustomPlayerController(dMatrix const&, NewtonBody const*, float, float)':
(.text+0xf09): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomPlayerController.o): In function `CustomPlayerController::CustomPlayerController(dMatrix const&, NewtonBody const*, float, float)':
(.text+0xfa4): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomPlayerController.o): In function `CustomPlayerController::CustomPlayerController(dMatrix const&, NewtonBody const*, float, float)':
(.text+0x1054): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomPlayerController.o): In function `CustomPlayerController::CustomPlayerController(dMatrix const&, NewtonBody const*, float, float)':
(.text+0x10ef): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomPlayerController.o): In function `CustomPlayerController::CustomPlayerController(dMatrix const&, NewtonBody const*, float, float)':
(.text+0x1199): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomPlayerController.o):(.text+0x1246): more undefined references to `dMatrix::RotateVector(dVector const&) const' follow
/usr/lib/libdJointLibrary.a(CustomKinematicController.o): In function `CustomKinematicController::SubmitConstraints(float, int)':
(.text+0x8e): undefined reference to `dMatrix::TransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomKinematicController.o): In function `CustomKinematicController::SubmitConstraints(float, int)':
(.text+0x15b): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomKinematicController.o): In function `CustomKinematicController::SubmitConstraints(float, int)':
(.text+0x823): undefined reference to `dQuaternion::CalcAverageOmega(dQuaternion const&, float) const'
/usr/lib/libdJointLibrary.a(CustomKinematicController.o): In function `CustomKinematicController::SubmitConstraints(float, int)':
(.text+0x99e): undefined reference to `dgGrammSchmidt(dVector const&)'
/usr/lib/libdJointLibrary.a(CustomKinematicController.o): In function `CustomKinematicController::SetTargetMatrix(dMatrix const&)':
(.text+0x1439): undefined reference to `dQuaternion::dQuaternion(dMatrix const&)'
/usr/lib/libdJointLibrary.a(CustomKinematicController.o): In function `CustomKinematicController::CustomKinematicController(NewtonBody const*, dVector const&)':
(.text+0x150c): undefined reference to `dMatrix::UntransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomKinematicController.o): In function `CustomKinematicController::GetTargetMatrix() const':
(.text+0x15bf): undefined reference to `dMatrix::dMatrix(dQuaternion const&, dVector const&)'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::CustomDGRayCastCar(int, dMatrix const&, NewtonBody*)':
(.text+0x45d): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::AddSingleSuspensionTire(void*, dVector const&, float, float, float, float, float, float, float, int)':
(.text+0x8b7): undefined reference to `dMatrix::UntransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::CalculateTireMatrix(int) const':
(.text+0xe09): undefined reference to `dPitchMatrix(float)'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::CalculateTireMatrix(int) const':
(.text+0xf59): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::CalculateTireMatrix(int) const':
(.text+0xf72): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::CalculateTireMatrix(int) const':
(.text+0xf88): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::CalculateTireCollision(CustomDGRayCastCar::Tire&, dMatrix const&, int) const':
(.text+0x1387): undefined reference to `dMatrix::TransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::CalculateTireCollision(CustomDGRayCastCar::Tire&, dMatrix const&, int) const':
(.text+0x15a4): undefined reference to `dMatrix::TransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::SubmitConstraints(float, int)':
(.text+0x1989): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::SubmitConstraints(float, int)':
(.text+0x1aa4): undefined reference to `dMatrix::TransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::SubmitConstraints(float, int)':
(.text+0x23b9): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::SubmitConstraints(float, int)':
(.text+0x24d6): undefined reference to `dMatrix::TransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::SubmitConstraints(float, int)':
(.text+0x26d2): undefined reference to `dMatrix::RotateVector(dVector const&) const'
lazarus.pp(125,42) Error: Error while linking
/usr/bin/ld: warning: ../link.res contains output sections; did you forget -T?
/usr/lib/libdJointLibrary.a(NewtonCustomJoint.o): In function `NewtonCustomJoint::CalculateLocalMatrix(dMatrix const&, dMatrix&, dMatrix&) const':
(.text+0x408): undefined reference to `dMatrix::Inverse() const'
/usr/lib/libdJointLibrary.a(NewtonCustomJoint.o): In function `NewtonCustomJoint::CalculateLocalMatrix(dMatrix const&, dMatrix&, dMatrix&) const':
(.text+0x424): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(NewtonCustomJoint.o): In function `NewtonCustomJoint::CalculateLocalMatrix(dMatrix const&, dMatrix&, dMatrix&) const':
(.text+0x4ce): undefined reference to `dMatrix::Inverse() const'
/usr/lib/libdJointLibrary.a(NewtonCustomJoint.o): In function `NewtonCustomJoint::CalculateLocalMatrix(dMatrix const&, dMatrix&, dMatrix&) const':
(.text+0x4e4): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(NewtonCustomJoint.o): In function `NewtonCustomJoint::CalculateGlobalMatrix(dMatrix const&, dMatrix const&, dMatrix&, dMatrix&) const':
(.text+0x66a): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(NewtonCustomJoint.o): In function `NewtonCustomJoint::CalculateGlobalMatrix(dMatrix const&, dMatrix const&, dMatrix&, dMatrix&) const':
(.text+0x715): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(CustomBallAndSocket.o): In function `CustomLimitBallAndSocket::SubmitConstraints(float, int)':
(.text+0xc1e): undefined reference to `dQuaternion::UnrotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomHinge.o): In function `CustomHinge::GetPinAxis() const':
(.text+0xc96): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomPlayerController.o): In function `CustomPlayerController::CustomPlayerController(dMatrix const&, NewtonBody const*, float, float)':
(.text+0x8c5): undefined reference to `dMatrix::TransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomPlayerController.o): In function `CustomPlayerController::CustomPlayerController(dMatrix const&, NewtonBody const*, float, float)':
(.text+0xf09): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomPlayerController.o): In function `CustomPlayerController::CustomPlayerController(dMatrix const&, NewtonBody const*, float, float)':
(.text+0xfa4): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomPlayerController.o): In function `CustomPlayerController::CustomPlayerController(dMatrix const&, NewtonBody const*, float, float)':
(.text+0x1054): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomPlayerController.o): In function `CustomPlayerController::CustomPlayerController(dMatrix const&, NewtonBody const*, float, float)':
(.text+0x10ef): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomPlayerController.o): In function `CustomPlayerController::CustomPlayerController(dMatrix const&, NewtonBody const*, float, float)':
(.text+0x1199): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomPlayerController.o):(.text+0x1246): more undefined references to `dMatrix::RotateVector(dVector const&) const' follow
/usr/lib/libdJointLibrary.a(CustomKinematicController.o): In function `CustomKinematicController::SubmitConstraints(float, int)':
(.text+0x8e): undefined reference to `dMatrix::TransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomKinematicController.o): In function `CustomKinematicController::SubmitConstraints(float, int)':
(.text+0x15b): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomKinematicController.o): In function `CustomKinematicController::SubmitConstraints(float, int)':
(.text+0x823): undefined reference to `dQuaternion::CalcAverageOmega(dQuaternion const&, float) const'
/usr/lib/libdJointLibrary.a(CustomKinematicController.o): In function `CustomKinematicController::SubmitConstraints(float, int)':
(.text+0x99e): undefined reference to `dgGrammSchmidt(dVector const&)'
/usr/lib/libdJointLibrary.a(CustomKinematicController.o): In function `CustomKinematicController::SetTargetMatrix(dMatrix const&)':
(.text+0x1439): undefined reference to `dQuaternion::dQuaternion(dMatrix const&)'
/usr/lib/libdJointLibrary.a(CustomKinematicController.o): In function `CustomKinematicController::CustomKinematicController(NewtonBody const*, dVector const&)':
(.text+0x150c): undefined reference to `dMatrix::UntransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomKinematicController.o): In function `CustomKinematicController::GetTargetMatrix() const':
(.text+0x15bf): undefined reference to `dMatrix::dMatrix(dQuaternion const&, dVector const&)'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::CustomDGRayCastCar(int, dMatrix const&, NewtonBody*)':
(.text+0x45d): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::AddSingleSuspensionTire(void*, dVector const&, float, float, float, float, float, float, float, int)':
(.text+0x8b7): undefined reference to `dMatrix::UntransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::CalculateTireMatrix(int) const':
(.text+0xe09): undefined reference to `dPitchMatrix(float)'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::CalculateTireMatrix(int) const':
(.text+0xf59): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::CalculateTireMatrix(int) const':
(.text+0xf72): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::CalculateTireMatrix(int) const':
(.text+0xf88): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::CalculateTireCollision(CustomDGRayCastCar::Tire&, dMatrix const&, int) const':
(.text+0x1387): undefined reference to `dMatrix::TransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::CalculateTireCollision(CustomDGRayCastCar::Tire&, dMatrix const&, int) const':
(.text+0x15a4): undefined reference to `dMatrix::TransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::SubmitConstraints(float, int)':
(.text+0x1989): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::SubmitConstraints(float, int)':
(.text+0x1aa4): undefined reference to `dMatrix::TransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::SubmitConstraints(float, int)':
(.text+0x23b9): undefined reference to `dMatrix::operator*(dMatrix const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::SubmitConstraints(float, int)':
(.text+0x24d6): undefined reference to `dMatrix::TransformVector(dVector const&) const'
/usr/lib/libdJointLibrary.a(CustomDGRayCastCar.o): In function `CustomDGRayCastCar::SubmitConstraints(float, int)':
(.text+0x26d2): undefined reference to `dMatrix::RotateVector(dVector const&) const'
/home/kjow/lazarus/ide/lazarus.pp(125,42) Error: Error while linking
/home/kjow/lazarus/ide/lazarus.pp(125,42) Fatal: There were 1 errors compiling module, stopping


so, how to compile NGD in linux?

then, if I want to try core_300 (on both windows/linux), how to do?

Thank you!
Last edited by Kjow on Tue Sep 13, 2011 10:10 am, edited 1 time in total.
Kjow
 
Posts: 56
Joined: Thu Nov 13, 2008 11:33 am

Re: [Win/Linux] Compiling NGD svn

Postby Krystian » Tue Sep 13, 2011 9:43 am

Try apply this patch Newton2_AndroidNDK.patch - it's to support AndroidNDK build, but I had similar errors (Android is using on Linux kernel, and newton is build by GCC too), which was fixed by adding some #include "..." in 2 or 3 files.
Or it was due to linking problems, I had to link my app with dMath, dContainers too.

To apply this patch on Windows (assuming that you are using TortoiseSVN) just go in explorer to your Newton directory:
1. Right click and select TortoiseSVN>Apply patch and select Newton2_AndroidNDK.patch file
2. On small window called "File patches ...", click right m.button and select "Patch all"

I think that core_300 will not work on anything other than Windows right now - I saw that there are used few explicit Windows functions like Sleep(), ReleaseSemaphore, etc.
Warning: I'm learning C/CPP/ARM-NEON/Newton/AndroidNDK/OpenGL ES, so whatever I post here, keep in mind that I can be totally wrong ;)
Krystian
 
Posts: 26
Joined: Thu Jul 21, 2011 3:11 pm
Location: Poland

Re: [Win/Linux] Compiling NGD svn

Postby Kjow » Tue Sep 13, 2011 10:21 am

Thank you for reply and the patch!

I tried to apply this patch directly into ubuntu: I copied this file into ngd svn root and typed: "patch -i Newton2_AndroidNDK.patch"
There was some errors and tring to recompile dCustomJoints I have same errors.

Anyway, the procedure I followed to compile Newton on Linux, is it right?

Code: Select all
cd ~/Desktop/newton-dynamics-read-only/coreLibrary_200/projets/linux32
make clean
make

and it produces libNewton.a + libNewton.so (but not Joint, etc), so I compiled manually:

cd ~/Desktop/newton-dynamics-read-only/packages/projects/linux32/dContainers
make
.../dCustomJoints
make
.../dMath
make
.../dScene
make
.../thirdParty
make

so now I have:

~/Desktop/newton-dynamics-read-only/packages/linux32$ ls
libdContainers.a libdMath.a libNewton.a Newton.h
libdJointLibrary.a libdScene.a libNewton.so

I copied all *.a to /usr/lib/
Kjow
 
Posts: 56
Joined: Thu Nov 13, 2008 11:33 am

Re: [Win/Linux] Compiling NGD svn

Postby Krystian » Tue Sep 13, 2011 10:34 am

I'm not an expert in makefiles (learning now, but I'm trying to avoid it as much as possible ;) ), but:
1. coreLibrary_200 building only core of NGD (in most? cases you need only this one)
2. I'm not sure how much order or make'ing is important, I would compile it in that order: coreLibrary_200, dMath, dContainers, dCustomJoints, thirdParty/tinyXml, dScene
3. Does you application links: dMath, dContainers, tinyXml too? On AndroidNDK I need link them explicit in my application.
4. You have ".../thirdParty", shouldn't be a ".../thirdParty/tinyXml"? (no errors about it now, but I think that they would appear, when you start using dScene, as it relies on it too).
Warning: I'm learning C/CPP/ARM-NEON/Newton/AndroidNDK/OpenGL ES, so whatever I post here, keep in mind that I can be totally wrong ;)
Krystian
 
Posts: 26
Joined: Thu Jul 21, 2011 3:11 pm
Location: Poland

Re: [Win/Linux] Compiling NGD svn

Postby Kjow » Tue Sep 13, 2011 10:59 am

Krystian wrote:I'm not an expert in makefiles (learning now, but I'm trying to avoid it as much as possible ;) ), but:
1. coreLibrary_200 building only core of NGD (in most? cases you need only this one)
+
3. Does you application links: dMath, dContainers, tinyXml too? On AndroidNDK I need link them explicit in my application.

Me neither :)
Anyway, I need core+joints. I'm developing an OpenGL program for Windows and Linux (and next maybe MacOSX) that use newton lib + joints. I simply compiled everything :P
2. I'm not sure how much order or make'ing is important, I would compile it in that order: coreLibrary_200, dMath, dContainers, dCustomJoints, thirdParty/tinyXml, dScene

Ok, i'll try with this order.
4. You have ".../thirdParty", shouldn't be a ".../thirdParty/tinyXml"? (no errors about it now, but I think that they would appear, when you start using dScene, as it relies on it too).

My mistake :)

Edit: I tried with your order, but nothing changed... I have always NewtonCustomJoint problems...
Kjow
 
Posts: 56
Joined: Thu Nov 13, 2008 11:33 am

Re: [Win/Linux] Compiling NGD svn

Postby Kjow » Tue Sep 13, 2011 11:02 am

If I try to compile newtonDemo, I have this error:

Code: Select all
~/Desktop/newton-dynamics-read-only/applications/newtonDemos/projects/linux32$ make
g++ -O0 -c -Wall -D_LINUX_VER -g -pg -I ../../../../coreLibrary_200/source/newton -I ../../sdkDemos -I ../../sdkDemos/demos -I ../../../../packages/thirdParty/tinyxml -I ../../../../packages/dMath -I ../../../../packages/dScene -I ../../../../packages/dCustomJoints -I ../../../../packages/linux32 -I ../../sdkDemos/toolBox -I ../../../../packages/dContainers -I /usr/include/qt4  -o ../../sdkDemos/DemoMesh.o ../../sdkDemos/DemoMesh.cpp   
In file included from ../../sdkDemos/DemoMesh.cpp:16:0:
../../sdkDemos/toolBox/toolbox_stdafx.h:71:22: fatal error: GL/glew.h: No such file or directory
compilation terminated.
make: *** [../../sdkDemos/DemoMesh.o] Error 1
Kjow
 
Posts: 56
Joined: Thu Nov 13, 2008 11:33 am

Re: [Win/Linux] Compiling NGD svn

Postby Krystian » Tue Sep 13, 2011 11:23 am

For above error try this patch (again, on root of Newton dir)
Attachments
NewtonSdkDemosLinuxPatch.zip
(687 Bytes) Downloaded 159 times
Warning: I'm learning C/CPP/ARM-NEON/Newton/AndroidNDK/OpenGL ES, so whatever I post here, keep in mind that I can be totally wrong ;)
Krystian
 
Posts: 26
Joined: Thu Jul 21, 2011 3:11 pm
Location: Poland

Re: [Win/Linux] Compiling NGD svn

Postby Kjow » Tue Sep 13, 2011 11:32 am

Code: Select all
~/Desktop/newton-dynamics-read-only$ patch -i NewtonSdkDemosLinux.patch
(Stripping trailing CRs from patch.)
patching file makefile
Hunk #1 FAILED at 46.
Hunk #2 FAILED at 60.
Hunk #3 FAILED at 70.
Hunk #4 FAILED at 162.
Hunk #5 FAILED at 174.
5 out of 5 hunks FAILED -- saving rejects to file makefile.rej


I get these errors. For this try I re-downloaded the entire svn trunk (so this is a clean svn download :))
Kjow
 
Posts: 56
Joined: Thu Nov 13, 2008 11:33 am

Re: [Win/Linux] Compiling NGD svn

Postby Krystian » Tue Sep 13, 2011 11:51 am

I would better use 'svn patch' instead 'patch' (not sure how this works...). Maybe previous patch also didn't worked correctly?
But above patch you can apply manually, as there was just 3-4 one line changes in one file
Warning: I'm learning C/CPP/ARM-NEON/Newton/AndroidNDK/OpenGL ES, so whatever I post here, keep in mind that I can be totally wrong ;)
Krystian
 
Posts: 26
Joined: Thu Jul 21, 2011 3:11 pm
Location: Poland

Re: [Win/Linux] Compiling NGD svn

Postby Kjow » Thu Sep 15, 2011 4:10 am

Hi,
I'm sorry for delay. I finally successfully applied the patch (Newton2_AndroidNDK.patch), but after compiling I have the same errors on linking. :(
Kjow
 
Posts: 56
Joined: Thu Nov 13, 2008 11:33 am

Re: [Win/Linux] Compiling NGD svn

Postby Kjow » Thu Sep 15, 2011 4:39 am

I made a new try:

1) Extracted all *.a

ar x libNewton.a
ar x libdJointLibrary.a
...

2) Created a new libNewton.a that contains all *.o previously extracted:

ar -cvq libNewton.a *.o

3) changed Joint lib dependency in my project from libdJointLibrary to libNewton

-> now the project compiles without errors, but when I launch the application I get a SIGSEGV error and it crashes.
Kjow
 
Posts: 56
Joined: Thu Nov 13, 2008 11:33 am

Re: [Win/Linux] Compiling NGD svn

Postby Krystian » Thu Sep 15, 2011 1:43 pm

Sorry I'm not able to help you, I've never used typical linux more than one week ;-)
But if you get that error/AV why not debug it, put a breakpoint, or see call stack at crash?
Warning: I'm learning C/CPP/ARM-NEON/Newton/AndroidNDK/OpenGL ES, so whatever I post here, keep in mind that I can be totally wrong ;)
Krystian
 
Posts: 26
Joined: Thu Jul 21, 2011 3:11 pm
Location: Poland

Re: [Win/Linux] Compiling NGD svn

Postby Kjow » Thu Sep 15, 2011 3:27 pm

Ok, thank you!

I tried using the debugger, but no luck (gdb crashes and it doesn't tell anything)...

Maybe someone that can compile a newton project for linux32 could send me the libraries to test... :)

____

Anyway, how to compile (for windows) core_300? (I would test it with my application on Windows)

Thanks!
Kjow
 
Posts: 56
Joined: Thu Nov 13, 2008 11:33 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest