Join Today
+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 16
Like Tree6Likes

Thread: [e6] How to compile SDL program

  1. #1

    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?

  2. #2
    Join Date
    Jun 2007
    Location
    Buenos Aires
    Posts
    616

    Default

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

    Droopy
    In Argentina

  3. #3
    Join Date
    Aug 2007
    Location
    Lviv, Ukraine
    Posts
    303

    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
    http://www.motorolafans.com/forums/s...ad.php?t=17584
    http://keaglez.blogspot.com/2008/01/...blackhawk.html

    Enjoy...
    Last edited by Lubomyr; 08-26-2008 at 03:28 PM.
    Halftux and puppetshow like this.

  4. #4

    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

  5. #5

    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?

  6. #6
    Join Date
    Aug 2007
    Location
    Lviv, Ukraine
    Posts
    303

    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 08:10 PM.

  7. #7

    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.
    droopyargentina and Lubomyr like this.

  8. #8

    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 :/

  9. #9
    Join Date
    Aug 2007
    Location
    Lviv, Ukraine
    Posts
    303

    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
    puppetshow likes this.

  10. #10
    Join Date
    Jun 2007
    Location
    Buenos Aires
    Posts
    616

    Default

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

    Droopy
    In Argentina


 
+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Compile a program on A1200
    By mdt414 in forum A1200 General Chat
    Replies: 0
    Last Post: 06-24-2008, 12:42 PM
  2. SDL compiled. Can't run SDL apps
    By riteshtonk in forum Development
    Replies: 6
    Last Post: 11-21-2007, 03:06 PM
  3. Cross Compile
    By joaorodrigo in forum A1200 General Chat
    Replies: 2
    Last Post: 05-22-2007, 12:07 AM
  4. [A925] program closed..program:music...reason code:user..
    By ferio in forum Symbian UIQ Symbian V7(A1000, M1000)
    Replies: 1
    Last Post: 04-29-2006, 03:21 PM
  5. SDL libs
    By Yuretz in forum E680 General Chat
    Replies: 0
    Last Post: 05-05-2005, 04:10 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Optimization by vBSEO 3.6.0 RC 1