Undefined References Help

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Undefined References Help

Postby Vinyalaith » Mon Jan 19, 2009 1:31 pm

Hi

I am a new user of the Newton physics engine, and from what I have seen it looks great. However, I am having a little bit of difficulty compiling the first sample program, and I was wondering if some kind person could help?

I have made sure that all of the headers can be found etc. and that I have actually linked to the Newton library, however, when I go to compile it, I get a load of undefined references:
Code: Select all
||=== 01_GettingStarted, Release ===|
obj\tutorial.o:tutorial.cpp:(.text+0x18e)||undefined reference to `RenderPrimitive::SetTexture(int)'|
obj\tutorial.o:tutorial.cpp:(.text+0x618)||undefined reference to `InitOpenGl(int, char**, char const*, void (*)())'|
obj\tutorial.o:tutorial.cpp:(.text+0x622)||undefined reference to `_glutMainLoop'|
obj\tutorial.o:tutorial.cpp:(.text+0x644)||undefined reference to `CHiResTimer::GetElapsedSeconds()'|
obj\tutorial.o:tutorial.cpp:(.text+0x661)||undefined reference to `dGetKeyState(int)'|
obj\tutorial.o:tutorial.cpp:(.text+0x678)||undefined reference to `GetCursorPos(MOUSE_POINT&)'|
obj\tutorial.o:tutorial.cpp:(.text+0x684)||undefined reference to `dGetKeyState(int)'|
obj\tutorial.o:tutorial.cpp:(.text+0x6b0)||undefined reference to `dGetKeyState(int)'|
obj\tutorial.o:tutorial.cpp:(.text+0x6f8)||undefined reference to `dGetKeyState(int)'|
obj\tutorial.o:tutorial.cpp:(.text+0x813)||undefined reference to `SetCamera(dVector const&, dVector const&)'|
obj\tutorial.o:tutorial.cpp:(.text+0x87e)||undefined reference to `__imp__glPushMatrix'|
obj\tutorial.o:tutorial.cpp:(.text+0x88a)||undefined reference to `SpherePrimitive::Render() const'|
obj\tutorial.o:tutorial.cpp:(.text+0x890)||undefined reference to `__imp__glPopMatrix'|
obj\tutorial.o:tutorial.cpp:(.text+0xcdf)||undefined reference to `dGetKeyState(int)'|
obj\tutorial.o:tutorial.cpp:(.text+0xd9d)||undefined reference to `dGetKeyState(int)'|
obj\tutorial.o:tutorial.cpp:(.text+0xf0e)||undefined reference to `CHiResTimer::CHiResTimer()'|
obj\tutorial.o:tutorial.cpp:(.text+0x1084)||undefined reference to `SpherePrimitive::SpherePrimitive(dSceneNode*, dMatrix const&, float, float, float, int)'|
obj\tutorial.o:tutorial.cpp:(.text+0x1118)||undefined reference to `vtable for SpherePrimitive'|
obj\tutorial.o:tutorial.cpp:(.text+0x1122)||undefined reference to `RenderPrimitive::~RenderPrimitive()'|
obj\tutorial.o:tutorial.cpp:(.text+0x1136)||undefined reference to `CHiResTimer::~CHiResTimer()'|
||=== Build finished: 20 errors, 0 warnings ===|


I am using Code::Blocks with MinGW as the compiler. I am using the dll version of Newton.lib, and I have read the documentation for the first tutorial.

I have searched on Google and on this forum, and nobody seems to be having the same problem. I was wondering if it was something to do with using MinGW, but other users seem to have reported that it works fine with it.

Does anybody know what's going wrong?

Thank you in advance.
Vinyalaith
 
Posts: 5
Joined: Mon Jan 19, 2009 1:09 pm

Re: Undefined References Help

Postby Julio Jerez » Mon Jan 19, 2009 1:46 pm

is this with the news realease?
viewtopic.php?f=9&t=4922
if you are using VS8 teh project sodul compile straight thought.

I have not made the 2003 project in a long time, so it may be mangled. I will check
Julio Jerez
Moderator
Moderator
 
Posts: 11154
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Undefined References Help

Postby Vinyalaith » Mon Jan 19, 2009 1:59 pm

It's with the latest release from the main downloads page (version 1.53) I can try the beta, but since I am using the stable version atm I would have thought it was something I'm not doing, or doing wrong.

I'll try the beta now and get back to you.
Vinyalaith
 
Posts: 5
Joined: Mon Jan 19, 2009 1:09 pm

Re: Undefined References Help

Postby Julio Jerez » Mon Jan 19, 2009 2:12 pm

In the newton forum the world Beta carry more weight that most other developers. I am proud to say this Beta is quite robust and had being test by hundres of people in all palforms..
One of the reason I made public is that the mailing list is so long that I can not possible send emails to all the users, and my email think it is a spam.


Give a try to 2.0 you can not go wrong with it since, it do no required installation or anything.
I can cohesist with 1.53.
Julio Jerez
Moderator
Moderator
 
Posts: 11154
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Undefined References Help

Postby Vinyalaith » Mon Jan 19, 2009 3:02 pm

Ok, I installed (extracted) version 2, but I can't seem to find the file CoreFoundation/CoreFoundation.h? toolbox_stdafx.h uses this file, but I can't find it anywhere in the rar.

And as a side note, it's great to hear that the beta's in such a stable state. That's one of the many reasons free software is so good - testing :D
Vinyalaith
 
Posts: 5
Joined: Mon Jan 19, 2009 1:09 pm

Re: Undefined References Help

Postby Julio Jerez » Mon Jan 19, 2009 3:06 pm

CoreFoundation/CoreFoundation.h is a mac system file
what platform are you using?
Julio Jerez
Moderator
Moderator
 
Posts: 11154
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Undefined References Help

Postby Vinyalaith » Mon Jan 19, 2009 3:20 pm

Windows, which is weird because I definately downloaded the windows version (NewtonWin-2.00.rar)
Vinyalaith
 
Posts: 5
Joined: Mon Jan 19, 2009 1:09 pm

Re: Undefined References Help

Postby Julio Jerez » Mon Jan 19, 2009 3:23 pm

you just need to double click on the file
C:tmp\NewtonWin-2.00\samples\sdkDemos\NewtonDemos_2009.sln
using VS2008

cna you run the binaries?
Julio Jerez
Moderator
Moderator
 
Posts: 11154
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Undefined References Help

Postby Vinyalaith » Tue Jan 20, 2009 6:21 pm

Yeah the binaries run.

I traced the fault back to the fact that the code checks to see if it is being compiled with VS, and if it isn't it assumes it isn't being compiled for Windows. I'm not using VS, I'm using Code::Blocks, so it was trying to find the mac headers.

Still loads of undefined references; I think it's something to do with third party libraries so I'll see if I can hunt down any unsatisfied dependencies (there shouldn't be any 'cause I've made sure all the libs are in order, but you never know).

Btw thanks for the quick responses and help. It's greatly appreciated.
Vinyalaith
 
Posts: 5
Joined: Mon Jan 19, 2009 1:09 pm


Return to General Discussion

Who is online

Users browsing this forum: Bing [Bot] and 6 guests