Results 1 to 3 of 3

Thread: error compiling SDL program

  1. #1
    Join Date
    Feb 2005
    Beans
    81

    error compiling SDL program

    I wrote a small bitmap editor in DevC++ using SDL today. It's my first program and I'm needless to say quite thrilled with it.

    Trying to compile it on ubuntu with gcc produced the following error.

    spacepopeye@yimmy:~/SDL/zombie$ gcc zombie3.cpp -o sdltest `sdl-config --cflags --libs`
    /tmp/ccH6rpJv.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
    collect2: ld returned 1 exit status

    I have no idea how to use gcc. The parameters there are from some SDL tut. Is their a good indroduction to GCC somwhere?
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2004
    Location
    Germany, Old Europe
    Beans
    379
    Distro
    Kubuntu Jaunty Jackalope (testing)

    Re: error compiling SDL program

    zombie3.cpp, is it a c++ program? Then you should use g++ instead of gcc. If it's pure C, try to rename it to zombie.c and use gcc.

    For an intro see An Introduction to GCC by Brian Gough. And 'man gcc' is also a good source if you need to look-up some flags.

  3. #3
    Join Date
    Feb 2005
    Beans
    81

    Re: error compiling SDL program

    Perfect, thanks.

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
  •