A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by Bird » Tue Nov 20, 2012 5:39 pm
I tried to make a Mac static lib build of the latest version(2851) and have hit a couple of problems. The coreLibrary_300 build was successful but dContainers and dScene Xcode projects do not compile due to some missing files in both. The dContainers project is looking for dThread files that aren't there and the sScene project seems to missing the files related to plugins like dPluginRecord.
I'm using Xcode 3.2.5 and I also noticed that the core library uses the OSX 10.6 SDK and the packages are set to use the 10.5 SDK.
-Bird
-
Bird
-
- Posts: 636
- Joined: Tue Nov 22, 2011 1:27 am
by Julio Jerez » Tue Nov 20, 2012 8:37 pm
ok I will try to build the xcode lib tonight.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Thu Nov 22, 2012 2:28 pm
ok I fixed those mac projects
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Bird » Fri Nov 23, 2012 4:06 pm
Thanks. They work fine now.
But I'm unable to make a simple "hello newton" console app work. Here's the code.
- Code: Select all
#include <Newton.h>
int totalMemoryUsed = 0;
// this is the call back for allocation newton memory
void* allocMemory (int sizeInBytes)
{
totalMemoryUsed += sizeInBytes;
return malloc (sizeInBytes);
}
// this is the callback for freeing Newton Memory
void freeMemory (void *ptr, int sizeInBytes)
{
totalMemoryUsed -= sizeInBytes;
free (ptr);
}
TEST(newton)
{
NewtonSetMemorySystem (allocMemory, freeMemory);
NewtonWorld* world = NewtonCreate ();
NewtonDestroy (world);
}
I used Xcode 4.5.2 to compile Newton this time because XCode 3.25 kept crashing. Xcode4 crashes too but because of the IDE improvements in Xcode4 it's easier to pinpoint the crash in dgMutexThread::Execute->TickCallback
http://hurleyworks.com/downloads/Xcode4Crash.png-Bird
-
Bird
-
- Posts: 636
- Joined: Tue Nov 22, 2011 1:27 am
by Julio Jerez » Fri Nov 23, 2012 4:18 pm
can you post the xcode test projetc that you made for xcode 3.25?
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Bird » Fri Nov 23, 2012 5:02 pm
Julio Jerez wrote:can you post the xcode test projetc that you made for xcode 3.25?
Here's the link to the project. Basically I just made a new c++ command line tool project in Xcode 3.25 and dropped in the debug version of libNewton.a and set the header search paths.
http://hurleyworks.com/downloads/HelloNewton.xcodeproj.zipAnd here's the exact source code I used.
- Code: Select all
#include <iostream>
#include <Newton.h>
int totalMemoryUsed = 0;
void* allocMemory (int sizeInBytes)
{
totalMemoryUsed += sizeInBytes;
return malloc (sizeInBytes);
}
void freeMemory (void *ptr, int sizeInBytes)
{
totalMemoryUsed -= sizeInBytes;
free (ptr);
}
int main (int argc, char * const argv[])
{
NewtonSetMemorySystem (allocMemory, freeMemory);
NewtonWorld* world = NewtonCreate ();
NewtonDestroy (world);
return 0;
}
-Bird
-
Bird
-
- Posts: 636
- Joined: Tue Nov 22, 2011 1:27 am
by Bird » Sat Nov 24, 2012 11:05 am
I also found the compiler won't accept this code in dgSimd.h->Floor() starting at line 179
- Code: Select all
_ASSERTE (ret.m_type.m128_f32[0] == dgFloor(m_type.m128_f32[0]));
_ASSERTE (ret.m_type.m128_f32[1] == dgFloor(m_type.m128_f32[1]));
_ASSERTE (ret.m_type.m128_f32[2] == dgFloor(m_type.m128_f32[2]));
_ASSERTE (ret.m_type.m128_f32[3] == dgFloor(m_type.m128_f32[3]));
The error message is "Member reference base type '__m128' is not a structure or union"
http://stackoverflow.com/questions/12624466/get-member-of-m128-by-index-Bird
-
Bird
-
- Posts: 636
- Joined: Tue Nov 22, 2011 1:27 am
by Julio Jerez » Sat Nov 24, 2012 11:47 am
I am tring to make a native Cocoa app to make the demos.
But since I do no know much abput Cocoa programming I need to read some beginner tutorial.
It si not as simpel as it seem because Cocoa use obejective C so ther is lot fo work, but I will start very simple
firs a hello world, just to make sure all worls.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Bird » Sat Nov 24, 2012 12:27 pm
Julio Jerez wrote:I am tring to make a native Cocoa app to make the demos.
But since I do no know much abput Cocoa programming I need to read some beginner tutorial.
It si not as simpel as it seem because Cocoa use obejective C so ther is lot fo work, but I will start very simple
firs a hello world, just to make sure all worls.
Philip Rideout made a very simple modern cross platform opengl api that might help you with the objective c code:
http://prideout.net/blog/?p=36the pez.cocoa.m might be useful to you
-Bird
-
Bird
-
- Posts: 636
- Joined: Tue Nov 22, 2011 1:27 am
by Julio Jerez » Sat Nov 24, 2012 12:33 pm
It is a glut,
Back in teh time of newton 1.5 I was using GLUT for all platform, it cause lot a agrvations with lot of people.
My experiece is that In Mac world if you do not make a CoCoa App, you alway get stigmatized, teh Mac Fan people are more extrem that the Linux.
But is nay case I am intersted in lernig COCOA as well, I have being use Mac for long tiem and alway running away for COCOA.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Bird » Sat Dec 01, 2012 6:24 pm
Hi Julio,
dScene won't compile now on the Mac in the latest build 2906. Looks like the itoa64 function you used in dMaterialsNodeInfo,cpp in Serialize() and Deserialize() is microsoft only.
-Bird
-
Bird
-
- Posts: 636
- Joined: Tue Nov 22, 2011 1:27 am
by Julio Jerez » Sat Dec 01, 2012 8:23 pm
Oh yes, I have to fix that. I am tryin to make a simple Mac framework this weekend, an dI will have those bug fiexed.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 0 guests