OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Compiling Sdl
merli
post Dec 29 2005, 04:00 AM
Post #1





Group: Members
Posts: 227
Joined: 27-April 05
Member No.: 7,008



Hello

I try to compile SDL on Zaurus using devimg. Everything seems to be OK except when I try to compile actual application I get foloowing messages

/home/QtPalmtop/lib/libSDL.a(SDL_audio.o): In function `SDL_RunAudio':
/home/userdata/zx/SDL-1.2.9/src/audio/SDL_audio.c:152: undefined reference to `SDL_ThreadID'
/home/QtPalmtop/lib/libSDL.a(SDL_audio.o): In function `SDL_LockAudio_Default':
/home/userdata/zx/SDL-1.2.9/src/audio/SDL_audio.c:257: undefined reference to `SDL_ThreadID'
/home/QtPalmtop/lib/libSDL.a(SDL_audio.o): In function `SDL_UnlockAudio_Default':
/home/userdata/zx/SDL-1.2.9/src/audio/SDL_audio.c:265: undefined reference to `SDL_ThreadID'
/home/QtPalmtop/lib/libSDL.a(SDL_audio.o): In function `SDL_RunAudio':
/home/userdata/zx/SDL-1.2.9/src/audio/SDL_audio.c:125: undefined reference to `DISKAUD_bootstrap'
/home/QtPalmtop/lib/libSDL.a(SDL_sysvideo.o): In function `QT_CreateDevice':
/home/userdata/zx/SDL-1.2.9/src/video/qtopia/SDL_sysvideo.cc:149: undefined reference to `QT_InitOSKeymap'
/home/userdata/zx/SDL-1.2.9/src/video/qtopia/SDL_sysvideo.cc:149: undefined reference to `QT_PumpEvents'
/home/QtPalmtop/lib/libSDL.a(SDL_events.o): In function `SDL_Lock_EventThread':
/home/userdata/zx/SDL-1.2.9/src/events/SDL_events.c:77: undefined reference to `SDL_ThreadID'
/home/QtPalmtop/lib/libSDL.a(SDL_events.o): In function `SDL_Unlock_EventThread':
/home/userdata/zx/SDL-1.2.9/src/events/SDL_events.c:87: undefined reference to `SDL_ThreadID'
/home/QtPalmtop/lib/libSDL.a(SDL_events.o): In function `SDL_GobbleEvents':
/home/userdata/zx/SDL-1.2.9/src/events/SDL_events.c:94: undefined reference to `SDL_ThreadID'
/home/QtPalmtop/lib/libSDL.a(SDL_thread.o): In function `SDL_GetErrBuf':
/home/userdata/zx/SDL-1.2.9/src/thread/SDL_thread.c:171: undefined reference to `SDL_ThreadID'
/home/QtPalmtop/lib/libSDL.a(SDL_thread.o): In function `SDL_RunThread':
/home/userdata/zx/SDL-1.2.9/src/thread/SDL_thread.c:203: undefined reference to `SDL_SYS_SetupThread'
/home/userdata/zx/SDL-1.2.9/src/thread/SDL_thread.c:207: undefined reference to `SDL_ThreadID'
/home/QtPalmtop/lib/libSDL.a(SDL_thread.o): In function `SDL_CreateThread':
/home/userdata/zx/SDL-1.2.9/src/thread/SDL_thread.c:257: undefined reference to `SDL_SYS_CreateThread'
/home/QtPalmtop/lib/libSDL.a(SDL_thread.o): In function `SDL_WaitThread':
/home/userdata/zx/SDL-1.2.9/src/thread/SDL_thread.c:277: undefined reference to `SDL_SYS_WaitThread'
/home/QtPalmtop/lib/libSDL.a(SDL_thread.o): In function `SDL_GetThreadID':
/home/userdata/zx/SDL-1.2.9/src/thread/SDL_thread.c:293: undefined reference to `SDL_ThreadID'
/home/QtPalmtop/lib/libSDL.a(SDL_thread.o): In function `SDL_KillThread':
/home/userdata/zx/SDL-1.2.9/src/thread/SDL_thread.c:301: undefined reference to `SDL_SYS_KillThread'
collect2: ld returned 1 exit status

I need libSDLmain.a, libSDL.la, libSDL.a to compile application.

Can someone point me to right direction? What am I doing wrong?
Thank you very much
Go to the top of the page
 
+Quote Post
melee
post Mar 1 2006, 09:17 AM
Post #2





Group: Members
Posts: 69
Joined: 17-March 05
Member No.: 6,651



QUOTE(merli @ Dec 29 2005, 01:00 PM)
Hello

I try to compile SDL on Zaurus using devimg. right]*


Hi

One of those "I don't quite understand the question" answers really.

The packages of the SDL libraries you require are Downloadable Here
Why re-invent the wheel by trying to compile them yourself.

The packages do not contain the static versions of the library but why you would want to link statically to the SDL libraries on a Zaurus? Huge waste of limited space.

Amending the makefile of whatever you are trying to build to include in the LIBS = -lSDL -lSDL_mixer -lSDL_image etc and removing the references to libSDL.a etc should allow a dynamic linking build.

If you really must have static libraries, I have found it easier in the past to compile them from the sources on my main computer which has the arm-linux-xxxx toolset installed and just specify to configure that I want to compile to target arm ( ./configure --target=arm or similar, run ./configure --help | less to get the configure options up )

Hope that is some help.

Melee
Go to the top of the page
 
+Quote Post
melee
post Mar 3 2006, 09:57 AM
Post #3





Group: Members
Posts: 69
Joined: 17-March 05
Member No.: 6,651



QUOTE(merli @ Dec 29 2005, 01:00 PM)
Hello

I try to compile SDL on Zaurus using devimg. right]*


Hi

I have done some research into SDL and now see why you need to link libSDLmain.a to get a correct main() entry point for your program.

So I have tried to be of more practical use to you

I have cross compiled SDL-1.2.9 for arm with QTopia support enabled.

A package of the SDL libraries you require included libSDLmain.a are Downloadable Here

I can bore you with the cross compile environment settings which allow the libraries to build at some later time if you wish.

Hope that is some help.

Melee
Go to the top of the page
 
+Quote Post
merli
post Mar 4 2006, 04:52 AM
Post #4





Group: Members
Posts: 227
Joined: 27-April 05
Member No.: 7,008



QUOTE(melee @ Mar 3 2006, 07:57 PM)
QUOTE(merli @ Dec 29 2005, 01:00 PM)
Hello

I try to compile SDL on Zaurus using devimg. right]*


Hi

I have done some research into SDL and now see why you need to link libSDLmain.a to get a correct main() entry point for your program.

So I have tried to be of more practical use to you

I have cross compiled SDL-1.2.9 for arm with QTopia support enabled.

A package of the SDL libraries you require included libSDLmain.a are Downloadable Here

I can bore you with the cross compile environment settings which allow the libraries to build at some later time if you wish.

Hope that is some help.

Melee
*




Thank you for your help. I have meantime switched to pdaXrom where everything "just" works. When I return back to Cacko I will try your SDL package. I tried to compile SDL 1.2.9 with Qtiopia support directly on Zaurus with zgcc or devimg package (no crosscompiling) but result library didnt work for me. I dont know what I did wrong.

Still I dont know how it is compiled for example snex9x which has SDL compiled dynamically as seen with ldd.
Go to the top of the page
 
+Quote Post
matthis
post Apr 20 2006, 06:18 PM
Post #5





Group: Members
Posts: 218
Joined: 12-February 06
From: Tokyo
Member No.: 9,124



Thank you for making this available, could you please indicate where the different files have to be place in order to compile apps which require them? Can they just be place in any of the "lib" folders?
Go to the top of the page
 
+Quote Post
melee
post Jul 6 2006, 07:34 AM
Post #6





Group: Members
Posts: 69
Joined: 17-March 05
Member No.: 6,651



QUOTE(matthis @ Apr 21 2006, 03:18 AM)
Thank you for making this available, could you please indicate where the different files have to be place in order to compile apps which require them? Can they just be place in any of the "lib" folders?
*

Sorry, haven't checked this forum for ages.

If you have not already found out -

The shared libraries need to be in whatever path is searched for libraries under your setup or specified in the makefile eg
(In Makefile)
LIBS = $(SUBLIBS) -L$(QTDIR)/lib -lqpe -ljpeg -lqte

so place libSDL_mixer.so in $(QTDIR)/lib and amend the line to

LIBS = $(SUBLIBS) -L$(QTDIR)/lib -lqpe -ljpeg -lqte -lSDL_mixer or whatever is required.

If you want to include a static library such as libSDLmain.a I have always found it easier to copy it to the same directory you are building from and modify the Makefile line to

LIBS = $(SUBLIBS) -L$(QTDIR)/lib -lqpe -ljpeg -lqte -lSDL_mixer ./libSDLmain.a

regards

Melee
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 29th November 2014 - 12:44 AM