C Linker error with stable release under linux - Unsolved

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

C Linker error with stable release under linux - Unsolved

Postby dirkson » Fri May 27, 2011 6:53 pm

Hey all. Trying to do this with 2.33 under 32 bit linux:
clang -std=c99 -I src/ -O3 -I lin/newton-dynamics-2.33/packages/linux32/ -L lin/newton-dynamics-2.33/packages/linux32 -lm -lGLU -lGL -lGLEW -lSDL -lalut -lNewton src/ScrumbleClient.c lin/obj/components.o lin/obj/materials.o lin/obj/audio.o -o lin/bin/scrumbleship

Results in this:

lin/newton-dynamics-2.33/packages/linux32/libNewton.so: undefined reference to `dgMallocStack(unsigned int)'
lin/newton-dynamics-2.33/packages/linux32/libNewton.so: undefined reference to `dgFreeStack(void*)'
collect2: ld returned 1 exit status
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [lin/bin/scrumbleship] Error 1

gcc returns similar errors.

Any ideas what's up?
Last edited by dirkson on Sun Jun 05, 2011 7:09 pm, edited 1 time in total.
dirkson
 
Posts: 3
Joined: Fri May 27, 2011 6:25 pm

Re: Linker error with C under linux.

Postby dirkson » Sat Jun 04, 2011 4:17 pm

After setting up and testing a windows build, the 2.33 windows dll does not have this problem.

If need be, I can see if the 64 bit linux .so has this issue.
dirkson
 
Posts: 3
Joined: Fri May 27, 2011 6:25 pm

Re: Linker error with C under linux.

Postby dirkson » Sun Jun 05, 2011 7:08 pm

Attempting to compile with a 64 bit linux 2.33 newton results in:

lin/newton-dynamics-2.33/packages/linux64/libNewton.so: undefined reference to `dgCRC(void const*, int, unsigned int)'
lin/newton-dynamics-2.33/packages/linux64/libNewton.so: undefined reference to `dgRef::m_rtti'
lin/newton-dynamics-2.33/packages/linux64/libNewton.so: undefined reference to `dgFree(void*)'
lin/newton-dynamics-2.33/packages/linux64/libNewton.so: undefined reference to `dgCRC(char const*)'
collect2: ld returned 1 exit status
dirkson
 
Posts: 3
Joined: Fri May 27, 2011 6:25 pm

Re: C Linker error with stable release under linux - Unsolve

Postby JernejL » Mon Jun 06, 2011 4:07 pm

I hope Julio can look into your problem, he knows best how to build and link newton on linux.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: C Linker error with stable release under linux - Unsolve

Postby Julio Jerez » Mon Jun 06, 2011 6:49 pm

I will try builling in my 32 bit laptop whin had Linux, see if it show the problem.
there should boy be any difference between the 32 and 64 bit build, in fact thy are a copy an dpset version of each other.

I am trying to avoid to have a dual boot of Linux and window in my machine.
It has being more than one occation than I have to go and figure put how to restart my window each time something goes wrong.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C Linker error with stable release under linux - Unsolve

Postby Julio Jerez » Tue Jun 07, 2011 8:15 am

in my current version that is in SVN in just when to folder
C:\Users\Julio\Desktop\newton-dynamics\coreLibrary_200\projets\linux32\

and I run the make file, and I di dnoi get any link error. I had some harmless warning, but I fix then too.

can you sync to SVN and try that, see if it work?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C Linker error with stable release under linux - Unsolve

Postby JernejL » Wed Jun 08, 2011 9:10 am

Dirkson's problem comes when he tries to build a linux game that uses the newton.so, he gets unresolved dynamic library references there - i think it is as if newton.so tries to import those functions from another external library..

Code: Select all
lin/newton-dynamics-2.33/packages/linux32/libNewton.so: undefined reference to `dgMallocStack(unsigned int)'
lin/newton-dynamics-2.33/packages/linux32/libNewton.so: undefined reference to `dgFreeStack(void*)'
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: C Linker error with stable release under linux - Unsolve

Postby Julio Jerez » Wed Jun 08, 2011 12:10 pm

I though that a .so file is like a dll,
I will try to mak ethe demo and see what happen then.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C Linker error with stable release under linux - Unsolve

Postby Julio Jerez » Thu Jun 09, 2011 10:01 am

Ok JernejL I just build the newtonDemos project in linux, and I fix all the error.

ther were error because of teh newer demos, but other than that I do no see any link error,

basically I jst open the console, go to forder C:\Users\Julio\Desktop\newton-dynamics\applications\newtonDemos\projects\linux32\makefile

type:
make clean
make

and is buidl all o fteh librarys and the elf.

I chekd everything into SVN.
Julio Jerez
Moderator
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 2 guests