SDL with qtopia enabled

hi all:

I am porting SDL with qtopia support to arm based linux system.
my sdl version is 1.2.7. Qtopia version is 1.5.2.

I have already cross compiled qtopia and qt/e.
I also conpiled SDL with qtopia enabled like this.

NM=arm-linux-nm LD=arm-linux-ld CC=arm-linux-gcc CXX=arm-linux-g++ RANLIB=arm-linux-ranlib AR=arm-linux-ar ./configure --enab
le-video-qtopia --disable-video-dummy --disable-video-x11 --disable-video-fbcon --disable-video-dga --disable-arts --disable
-esd --disable-alsa --disable-cdrom --disable-nasm --prefix=/home/sgj/armsdl --host=arm-unknown-linux-gnu

this build is sucessfully.

and when I use it to cross my own test.c, error happen.
test.c is like belows:

#include “SDL.h”
#include <stdlib.h>

int main(int argc, char ** argv)
{
SDL_Rect **modes;
int i;

    SDL_Init(SDL_INIT_VIDEO);

    /* Get available fullscreen/hardware modes */
    modes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE);

    /* Check is there are any modes available */
    if(modes == (SDL_Rect **)0){
            printf("No modes available!\n");
            exit(-1);
    }

    /* Check if or resolution is restricted */
    if(modes == (SDL_Rect **)-1){
            printf("All resolutions available.\n");
    }
    else
    {
            /* Print valid modes */
            printf("Available Modes\n");
            for(i=0;modes[i];++i)
                    printf("  %d x %d\n", modes[i]->w, modes[i]->h);
    }
    return 0;

}

I use “arm-linux-gcc sdl-config --cflags sdl-config --libs test.c -o test"
to compile. but error happened and inlcuded a list of items of
”/home/sgj/lib/libSDL.so: undefined reference of QWidget::setFocus"

collect2: ld returned 1 exit status
make: *** [arm1] Error 1

how can I compile a test program that use SDL with qtopia enabled in its body and let this program run in arm-based linux and qtopia platform.

thanks in advance!========================================================

??? ??? VIP??? ??? http://vip.163.com

??? 25???4??? http://mail.163.com

??? ??? http://popo.163.com

Try that:

arm-linux-gcc /home/sgj/armsdl/bin/sdl-config --cflags /home/sgj/armsdl/bin/sdl-config --libs test.c -o test> ----- Original Message -----

From: sdl-bounces+cedric.bompart=morse.com@libsdl.org [mailto:sdl-bounces+cedric.bompart=morse.com at libsdl.org] On Behalf Of higsn
Sent: 14 May 2004 13:11
To: sdl at libsdl.org
Subject: [SDL] SDL with qtopia enabled

hi all:

I am porting SDL with qtopia support to arm based linux system.
my sdl version is 1.2.7. Qtopia version is 1.5.2.

I have already cross compiled qtopia and qt/e.
I also conpiled SDL with qtopia enabled like this.

NM=arm-linux-nm LD=arm-linux-ld CC=arm-linux-gcc CXX=arm-linux-g++ RANLIB=arm-linux-ranlib AR=arm-linux-ar ./configure --enab le-video-qtopia --disable-video-dummy --disable-video-x11 --disable-video-fbcon --disable-video-dga --disable-arts --disable -esd --disable-alsa --disable-cdrom
–disable-nasm --prefix=/home/sgj/armsdl --host=arm-unknown-linux-gnu

this build is sucessfully.

and when I use it to cross my own test.c, error happen.
test.c is like belows:

#include “SDL.h”
#include <stdlib.h>

int main(int argc, char ** argv)
{
SDL_Rect **modes;
int i;

    SDL_Init(SDL_INIT_VIDEO);

    /* Get available fullscreen/hardware modes */
    modes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE);

    /* Check is there are any modes available */
    if(modes == (SDL_Rect **)0){
            printf("No modes available!\n");
            exit(-1);
    }

    /* Check if or resolution is restricted */
    if(modes == (SDL_Rect **)-1){
            printf("All resolutions available.\n");
    }
    else
    {
            /* Print valid modes */
            printf("Available Modes\n");
            for(i=0;modes[i];++i)
                    printf("  %d x %d\n", modes[i]->w, modes[i]->h);
    }
    return 0;

}

I use “arm-linux-gcc sdl-config --cflags sdl-config --libs test.c -o test"
to compile. but error happened and inlcuded a list of items of
”/home/sgj/lib/libSDL.so: undefined reference of QWidget::setFocus"

collect2: ld returned 1 exit status
make: *** [arm1] Error 1

how can I compile a test program that use SDL with qtopia enabled in its body and let this program run in arm-based linux and qtopia platform.

thanks in advance!

========================================================

??? ??? VIP??? ??? http://vip.163.com

??? 25???4??? http://mail.163.com

??? ??? http://popo.163.com

hi:
I have tried this. But it doesn’t work.
as a matter of fact, there is only one copy of sdl-config in my computer.
my path has includee /home/sgj/armsdl/bin.
I am sure that sdl-config has the same effect as /home/sgj/armsdl/bin/sdl-config> Try that:

arm-linux-gcc /home/sgj/armsdl/bin/sdl-config --cflags /home/sgj/armsdl/bin/sdl-config --libs test.c -o test

-----Original Message-----

From: sdl-bounces+cedric.bompart=morse.com at libsdl.org [mailto:sdl-bounces+cedric.bompart=morse.com at libsdl.org] On Behalf Of higsn

Sent: 14 May 2004 13:11

To: sdl at libsdl.org

Subject: [SDL] SDL with qtopia enabled

hi all:

I am porting SDL with qtopia support to arm based linux system.

my sdl version is 1.2.7. Qtopia version is 1.5.2.

I have already cross compiled qtopia and qt/e.

I also conpiled SDL with qtopia enabled like this.

NM=arm-linux-nm LD=arm-linux-ld CC=arm-linux-gcc CXX=arm-linux-g++ RANLIB=arm-linux-ranlib AR=arm-linux-ar ./configure --enab le-video-qtopia --disable-video-dummy --disable-video-x11 --disable-video-fbcon --disable-video-dga --disable-arts --disable -esd --disable-alsa --disable-cdrom

–disable-nasm --prefix=/home/sgj/armsdl --host=arm-unknown-linux-gnu

this build is sucessfully.

and when I use it to cross my own test.c, error happen.

test.c is like belows:

#include “SDL.h”

#include <stdlib.h>

int main(int argc, char ** argv)

{

    SDL_Rect **modes;
    int i;
    SDL_Init(SDL_INIT_VIDEO);
    /* Get available fullscreen/hardware modes */
    modes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE);
    /* Check is there are any modes available */
    if(modes == (SDL_Rect **)0){
            printf("No modes available!\n");
            exit(-1);
    }
    /* Check if or resolution is restricted */
    if(modes == (SDL_Rect **)-1){
            printf("All resolutions available.\n");
    }
    else
    {
            /* Print valid modes */
            printf("Available Modes\n");
            for(i=0;modes[i];++i)
                    printf("  %d x %d\n", modes[i]->w, modes[i]->h);
    }
    return 0;

}

I use “arm-linux-gcc sdl-config --cflags sdl-config --libs test.c -o test”

to compile. but error happened and inlcuded a list of items of

“/home/sgj/lib/libSDL.so: undefined reference of QWidget::setFocus”

collect2: ld returned 1 exit status

make: *** [arm1] Error 1

how can I compile a test program that use SDL with qtopia enabled in its body and let this program run in arm-based linux and qtopia platform.

thanks in advance!

========================================================

??? ??? VIP??? ??? http://vip.163.com

??? 25???4??? http://mail.163.com

??? ??? http://popo.163.com


SDL mailing list

SDL at libsdl.org

http://www.libsdl.org/mailman/listinfo/sdl

========================================================

??? ??? VIP??? ??? http://vip.163.com

??? 25???4??? http://mail.163.com

??? ??? http://popo.163.com