The Motorola Development Community


Go Back   MotorolaFans.com Forums > Developments > Development
Notices

Development Hacking, development, scripts etc

Reply

MotoFans MODR

Join Date: Jul 2008
Posts: 105
Thanks: 4
Thanked 21 Times in 15 Posts
Location: Poland

Quote  
#1
08-03-2008
Unhappy [e6] How to compile SDL program

Hi. I've been trying to do it for past two days, no luck
I have the ezx-toolchain from this forum, I can already write QT/console program without any problem. What I want is compiling SDL "hello world", but no luck

I have the SDL libraries used for games (this forum -> moto gamers) and they work with these precompiled games. So I've installed SDL-devel, programs compiled but they don't work:
Code:
[pc] $ gcc test.c -o sdl -lSDL -I/usr/include/SDL -L/opt/dev-ezx/e6/lib
[phone] $ ./sdl: relocation error: /mmc/mmca1/games/lib/libSDL-1.2.so.0: undefined symbol: _ZN6QGList5clearEv
I also tried static:
Code:
[pc] $ gcc test.c -o sdl -lSDL -I/usr/include/SDL -L/opt/dev-ezx/e6/lib -lpthread -static
[phone] $ ./sdl
Segmentation fault
(without pthread it wasn't even compiling)
And many other..

Please, tell me, how to setup environment to compile SDL programs against these libs? What may be problem in my env? Maybe the header files mismatch? I couldn't find original used to compile these SDL libraries, so I installed newest...
Any ideas?
Reply With Quote


User Information
Current Phone: Motorola E6
Firmware: 11.12.09P
Location: Poland

puppetshow is offlineReport Post
Moto Fans SENR

Join Date: Jun 2007
Posts: 599
Thanks: 19
Thanked 212 Times in 64 Posts
Location: Buenos Aires

Quote  
#2
08-03-2008
Default

Many russian such as Winand , etc are used to compile SDL.
Wait until they read this tread.

Droopy
__________________
In Argentina
Reply With Quote


User Information
Current Phone: A1200
Firmware: 32p Spanish
Location: Buenos Aires

droopyargentina is offlineReport Post
MotoFans XPRT

Lubomyr's Avatar

Join Date: Aug 2007
Posts: 252
Thanks: 70
Thanked 370 Times in 145 Posts
Location: Lviv, Ukraine

Send a message via ICQ to Lubomyr Send a message via Skype™ to Lubomyr
Quote  
#3
08-03-2008
Default

100% working SDL-enviroment for
1)cygwin+a1200devezxsdk
2)linux+1200blackhawksdk

translated in english http://www.google.com/translate?langpair=ru|en&u=http://forum.motofan.ru/index.php?showtopic=145454&st=0

original in russian http://forum.motofan.ru/index.php?ac...0#entry1108914

with this sdl enviroment, ported by me many SDL-app like (scummvm, jooleem, openttd, nuclearchess, alienblaster...)

package include all config,libs,includes
* SDL (libSDL) (a1200 port by eug)
* SDL_image (libSDL_image) (a1200 port by eug)
* SDL_mixer (libSDL_mixer) (a1200 port by eug)
* SDL_net (libSDL_net) (a1200 port by eug)
* SDL_ttf (libSDL_ttf) (a1200 port by lubomyr)
* SDL_gfx (libSDL_gfx) (a1200 port by lubomyr)
* SDL_sound (libSDL_sound) (a1200 port by lubomyr)
* zlib (libz) (a1200 port by eug)
* jpeg (libjpeg) (a1200 port by eug)
* Vorbis (libvorbis) (a1200 port by eug)
* ncurses (ncurses) (a1200 port by eug)
* Tremor (libvorbisidec) (a1200 port by lubomyr)
* mikmod (libmikmod) (a1200 port by eug)
* freetype (libfreetype) (a1200 port by lubomyr)
* png (libpng) (a1200 port by eug)
* ogg (libogg) (a1200 port by eug)
* FLAC (libFLAC) (a1200 port by lubomyr)
* mad (libmad) (a1200 port by lubomyr)
* mpeg2dec (libmpeg2) (a1200 port by lubomyr)
* smpeg (libsmpeg) (a1200 port by eug)
* xml2 (libxml2) (a1200 port by lubomyr)

manual created by me

used info from
EZX Crosstool and SDK for Motorola EZX phones
http://keaglez.blogspot.com/2008/01/...blackhawk.html

Enjoy...

Last edited by Lubomyr; 08-26-2008 at 04:28 PM.
Reply With Quote


User Information
Current Phone: Motorola A1200e
Firmware: 14R Gizmoto M59 UA
Location: Lviv, Ukraine

Lubomyr is online nowReport Post
The Following 2 Users Say Thank You to Lubomyr For This Useful Post:
Halftux (1 Week Ago), puppetshow (08-04-2008)
MotoFans MODR

Join Date: Jul 2008
Posts: 105
Thanks: 4
Thanked 21 Times in 15 Posts
Location: Poland

Quote  
#4
08-03-2008
Default

Thank you Lubomyr, downloading the 'games-env-cygwin', we'll see
Does it support ncurses, by any chance? I saw ncurses libs in the package I mentioned earlier (the one needed to run games like openttd)

If yes, then I'll be able to port nice jabber client - ekg2 Or bitlbee + irssi
Reply With Quote


User Information
Current Phone: Motorola E6
Firmware: 11.12.09P
Location: Poland

puppetshow is offlineReport Post
MotoFans MODR

Join Date: Jul 2008
Posts: 105
Thanks: 4
Thanked 21 Times in 15 Posts
Location: Poland

Quote  
#5
08-04-2008
Default

Yeah, I managed to compile SDL program, and even ported Visual Boy Advance (which isn't working, phone is too slow I guess).
Now I have problem with ncurses-based program - after compiling, I try to run it and I get:
Code:
Error opening terminal: xterm.
(no matter what TERM type I'll set)
The Allegro libs (yeah, I'm trying all of them!) aren't working as well, this time dying while linking:
Code:
/usr/local/lib/liballeg-4.2.2.so: undefined reference to `_colorconv_rgb_scale_5x35'
/usr/local/lib/liballeg-4.2.2.so: undefined reference to `_colorconv_indexed_palette'
/usr/local/lib/liballeg-4.2.2.so: undefined reference to `_colorconv_rgb_map'
collect2: ld returned 1 exit status
Do you know how to solve it?
Reply With Quote


User Information
Current Phone: Motorola E6
Firmware: 11.12.09P
Location: Poland

puppetshow is offlineReport Post
MotoFans XPRT

Lubomyr's Avatar

Join Date: Aug 2007
Posts: 252
Thanks: 70
Thanked 370 Times in 145 Posts
Location: Lviv, Ukraine

Send a message via ICQ to Lubomyr Send a message via Skype™ to Lubomyr
Quote  
#6
08-04-2008
Default

i have same problem with ncurses
Error opening terminal: ansi.

and same problem with allegro
/usr/local/lib/liballeg-4.2.2.so: undefined reference to `_colorconv_rgb_scale_5x35'
/usr/local/lib/liballeg-4.2.2.so: undefined reference to `_colorconv_indexed_palette'
/usr/local/lib/liballeg-4.2.2.so: undefined reference to `_colorconv_rgb_map'
collect2: ld returned 1 exit status

i don't known how to solve this prob.

Last edited by Lubomyr; 08-04-2008 at 09:10 PM.
Reply With Quote


User Information
Current Phone: Motorola A1200e
Firmware: 14R Gizmoto M59 UA
Location: Lviv, Ukraine

Lubomyr is online nowReport Post
MotoFans MODR

Join Date: Jul 2008
Posts: 105
Thanks: 4
Thanked 21 Times in 15 Posts
Location: Poland

Quote  
#7
08-04-2008
Default

Ah, I found solution for ncurses.
Download this: http://evil.nomicon.pl/terminfo.tar.bz2
Code:
mkdir -pv /mmc/mmca1/.home/.terminfo
export HOME=/mmc/mmca1/.home/
Now extract the file you downloaded to the $HOME/.terminfo, so you'd get something like this:
Code:
# ls /mmc/mmca1/.home/.terminfo
E  a  c  d  h  l  m  p  r  s  v  w  x
POOF! Your ncurses work
This means I'm going to port irssi! And bitlbee! That is, FINALLY decent IM client for E6

Still working on allegro, though.
Reply With Quote


User Information
Current Phone: Motorola E6
Firmware: 11.12.09P
Location: Poland

puppetshow is offlineReport Post
The Following 2 Users Say Thank You to puppetshow For This Useful Post:
droopyargentina (08-26-2008), Lubomyr (08-04-2008)
MotoFans MODR

Join Date: Jul 2008
Posts: 105
Thanks: 4
Thanked 21 Times in 15 Posts
Location: Poland

Quote  
#8
08-25-2008
Default

One more question, I can't find it anywhere: What are the SDL key definitions, for e.g. left, right, camera, carrier/custom keys etc? For E6 of course. I had this info somewhere, but apparently it's lost :/
Reply With Quote


User Information
Current Phone: Motorola E6
Firmware: 11.12.09P
Location: Poland

puppetshow is offlineReport Post
MotoFans XPRT

Lubomyr's Avatar

Join Date: Aug 2007
Posts: 252
Thanks: 70
Thanked 370 Times in 145 Posts
Location: Lviv, Ukraine

Send a message via ICQ to Lubomyr Send a message via Skype™ to Lubomyr
Quote  
#9
08-26-2008
Default

SDL key definitions

SDL_QT_MODIFICATOR=1

Key_a1200/e6 = SDLKeyName = SDLKeyCode

Call (a1200/e6) = SDLK_SPACE = 32
HangUp (a1200/e6) = SDLK_ESCAPE = 27
Camera (a1200/e6) = SDLK_PAUSE = 19
Volume+ (a1200/e6) = SDLK_PLUS = 43
Volume- (a1200/e6) = SDLK_MINUS = 45
Fire (a1200/e6) = SDLK_RETURN = 13
Up (a1200/e6) = SDLK_RIGHT = 275
Down (a1200/e6) = SDLK_LEFT = 276
Right (a1200/e6) = SDLK_DOWN = 274
Left (a1200/e6) = SDLK_UP = 273
Forward (e6) = SDLK_q = 113
Pause (e6) = SDLK_p = 112
Back (e6) = SDLK_o = 111
und.Call (e6) = SDLK_r = 114

select key (between vol+ & vol-) (a1200) = MOD key
und.hangup (e6) = MOD key

mod+Call (a1200/e6) = SDLK_f = 102
mod+Hangup (a1200/e6) = SDLK_a = 97
mod+Camera (a1200/e6) = SDLK_e =101
mod+Volume+ (a1200/e6) = SDLK_c = 99
mod+Volume- (a1200/e6) = SDLK_d = 100
mod+Fire (a1200/e6) = SDLK_b = 98
mod+Up (a1200/e6) = SDLK_j = 106
mod+Down (a1200/e6) = SDLK_i = 105
mod+Right (a1200/e6) = SDLK_h = 104
mod+Left (a1200/e6) = SDLK_g = 103


SDL_QT_MODIFICATOR=0
MOD key = SDLK_TAB = 9
Reply With Quote


User Information
Current Phone: Motorola A1200e
Firmware: 14R Gizmoto M59 UA
Location: Lviv, Ukraine

Lubomyr is online nowReport Post
The Following User Says Thank You to Lubomyr For This Useful Post:
puppetshow (08-26-2008)
Moto Fans SENR

Join Date: Jun 2007
Posts: 599
Thanks: 19
Thanked 212 Times in 64 Posts
Location: Buenos Aires

Quote  
#10
08-26-2008
Default

Thanks for both of you.
Hope to see more SDL software and games!!
They run fast and nice.

Droopy
__________________
In Argentina
Reply With Quote


User Information
Current Phone: A1200
Firmware: 32p Spanish
Location: Buenos Aires

droopyargentina is offlineReport Post
Reply

Tags
compile, compile sdl, program, sdl

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile a program on A1200 mdt414 A1200 General Chat 0 06-24-2008 01:42 PM
SDL compiled. Can't run SDL apps riteshtonk Development 6 11-21-2007 03:06 PM
SDL lib alebm Development 21 05-19-2006 12:01 PM
[A925] program closed..program:music...reason code:user.. ferio Symbian UIQ Symbian V7(A1000, M1000) 1 04-29-2006 04:21 PM
SDL libs Yuretz E680 General Chat 0 05-05-2005 05:10 PM


All times are GMT. The time now is 10:08 PM. Search Engine Friendly URLs by vBSEO 3.2.0 Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. VBulletin Skin by ForumMonkeys.