Results 1 to 4 of 4

Thread: compiling Mappy map editor

  1. #1
    Join Date
    May 2009
    Location
    England
    Beans
    194
    Distro
    Ubuntu 10.04 Lucid Lynx

    compiling Mappy map editor

    A long time ago I wrote a few programs, mainly computer games in Blitz Basic (a BASIC compiler) that came bundled with a map editor called mappy.

    I've decided to learn a real language and settled on C++ following the learn C++ in 21 days tutorial (http://newdata.box.sk/bx/c/) with the aim of eventually translating my old games in to C++ and hopefully getting them to run on Ubuntu.

    I was hoping to use mappy again and notice it has been compiled and run in linux before http://membres.multimania.fr/edorul/SDLMappye.htm, however I'm having some trouble.

    This is what I've done so far...
    -installed allegro from source and downloaded the source for mappy.c
    -installed code::blocks as an IDE
    -opened mappy.c in code::blocks and changed the compiler settings to include the `allegro-config --libs` in the linker settings
    -compiled, this gave a lot of warnings about lines being 'deprecated' but no errors
    -ran from code::blocks, this gives a allegro #11 error, segfault and closes automatically.

    I'm still quite new to all of this and have already learnd a lot in the last few days however this has got me stumped. To make things worse I dont have the internet on my computer at the moment so can only check up what to next occasionally. I'll copy the compling log onto a usb and put it up here next time I'm near the net. Any suggestions in the meantime?

    EDIT->> here is the link to the original Mappy page.... http://tilemap.co.uk/mappy.php
    Last edited by pieman711; February 2nd, 2011 at 02:31 PM. Reason: added more info

  2. #2
    Join Date
    May 2009
    Location
    England
    Beans
    194
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: compiling Mappy map editor

    Here is the error when compling in COde::blocks:


    Compiling: /home/pieman/Downloads/cpp/Mappy/mappy.c
    /home/pieman/Downloads/cpp/Mappy/mappy.c: In function ‘GetScreen’:
    /home/pieman/Downloads/cpp/Mappy/mappy.c:497: warning: ‘text_mode’ is deprecated (declared at /usr/local/include/allegro/alcompat.h:155)
    /home/pieman/Downloads/cpp/Mappy/mappy.c: In function ‘NewProject’:
    /home/pieman/Downloads/cpp/Mappy/mappy.c:1023: warning: ‘file_select’ is deprecated (declared at /usr/local/include/allegro/alcompat.h:141)
    /home/pieman/Downloads/cpp/Mappy/mappy.c: In function ‘ShowHelp1’:
    /home/pieman/Downloads/cpp/Mappy/mappy.c:1143: warning: ‘text_mode’ is deprecated (declared at /usr/local/include/allegro/alcompat.h:155)
    /home/pieman/Downloads/cpp/Mappy/mappy.c:1144: warning: ‘textout’ is deprecated (declared at /usr/local/include/allegro/alcompat.h:157)


    ...
    The lots more of very similar stuff...
    and finally
    ...


    /home/pieman/Downloads/cpp/Mappy/mappy.c:6324: warning: ‘text_mode’ is deprecated (declared at /usr/local/include/allegro/alcompat.h:155)
    Linking console executable: /home/pieman/Downloads/cpp/Mappy/mappy
    Process terminated with status 0 (0 minutes, 2 seconds)
    0 errors, 323 warnings

    Checking for existence: /home/pieman/Downloads/cpp/Mappy/mappy
    Executing: xterm -T '/home/pieman/Downloads/cpp/Mappy/mappy' -e /usr/bin/cb_console_runner "/home/pieman/Downloads/cpp/Mappy/mappy" (in /home/pieman/Downloads/cpp/Mappy)
    Process terminated with status 0 (0 minutes, 4 seconds)

  3. #3
    Join Date
    Sep 2009
    Beans
    1,293

    Re: compiling Mappy map editor

    Deprecated is a warning,
    "Your code is old, the libraries you are using have changed and you need to update how you use them, you have some time before the functions you're using are dropped"

    They arent in themselves a problem for compiling/running

    Sadly, i can't crash the program myself.

    With mappy version 101s on i386 (ubuntu natty)
    Code:
    $ gcc -o mappy mappy.c -lalleg -lX11  -lm -lXxf86vm -lXcursor -lXpm -lXext -lX11 -lpthread -ldl
    $ ./mappy
    runs fine.

    You would need to generate a backtrace to understand exactly whats going wrong
    Code:
    $ gdb ./mappy
    (gdb) run
    ...
    Segmentation fault
    (gdb) backtrace full
    (The debugger is your only friend in a crisis )
    Your ide should use gdb in a more friendly way i imagine

  4. #4
    Join Date
    May 2009
    Location
    England
    Beans
    194
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: compiling Mappy map editor

    I've no idea what I did differently but when I re complied it again (not sure how many times I've tried it now) all of a sudden it worked. it still crashes occasionally with a seg fault but mostly runs fine. I've gone to using the windows version in WINE as its a bit more stable and has a nicer GUI anyway.
    Thanks for the help anyway, I may play around with the older version when I'm a bit more competent with C.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •