Hi,
I encounter some problems during making the library,
I would like to port SDL library on my embedded device,
My devices is OMAP 3621 (ARMv7), operating system is Linux 2.6.32.7,
and I use Sourcery G++ Lite 2008q3-72 as the toolchain,
below is my process…
configure
./configure
–enable-static
–enable-shared
–enable-audio
–enable-video
–enable-loadso
–enable-nanox-direct-fb
–enable-video-fbcon
–enable-video-directfb
–disable-esd
–target=arm-none-linux-
gnueabi
–host=arm-none-linux-gnueabi
–enable-rpath
Make and install
make
make install
Copy the lib files to the target board
[on the target board]
lrwxrwxrwx 1 root root 20 Jan 1 00:46
/usr/local/lib/libSDL-1.2.so.0 -> libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 954098 Jan 1 00:38
/usr/local/lib/libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 1388774 Jan 1 00:38
/usr/local/lib/libSDL.a
-rwxr-xr-x 1 root root 946 Jan 1 00:38
/usr/local/lib/libSDL.la
lrwxrwxrwx 1 root root 20 Jan 1 00:46
/usr/local/lib/libSDL.so -> libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 3666 Jan 1 00:38
/usr/local/lib/libSDLmain.a
Write an easy sample code
#include <stdlib.h>
#include <stdio.h>
#include “SDL.h”
main(int argc, char *argv[])
{
printf("\n\n======>1\n");
if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, “Unable to init SDL: %s\n”, SDL_GetError());
exit(1);
}
printf("\n\n======>2\n");
atexit(SDL_Quit);
}
Compile
$ arm-none-linux-gnueabi-gcc -I/usr/local/include/SDL -L/usr/local/lib -lSDL
hello.c -o hello
cc1: warning: include location “/usr/local/include/SDL” is unsafe for
cross-compilation
/home/acos/CodeSourcery/Sourcery_G++_Lite/bin/…/lib/gcc/arm-none-linux-gnueabi/4.3.2/…/…/…/…/arm-none-linux-gnueabi/bin/ld:
warning: library search path “/usr/local/lib” is unsafe for
cross-compilation
Execute hello
[on board]
sh hello
hello: line 1: syntax error: unexpected word (expecting “)”)
./hello
./hello: error while loading shared libraries: /lib/libSDL-1.2.so.0: ELF
file version does not match current one
any one can help me…? PLEASE
Yu-Sheng, Wang
Hi,
I encounter some problems during making the library,
I would like to port SDL library on my embedded device,
My devices is OMAP 3621 (ARMv7), operating system is Linux 2.6.32.7,
and I use Sourcery G++ Lite 2008q3-72 as the toolchain,
below is my process…
configure
./configure
–enable-static
–enable-shared
–enable-audio
–enable-video
–enable-loadso
–enable-nanox-direct-fb
–enable-video-fbcon
–enable-video-directfb
–disable-esd
–target=arm-none-linux-
gnueabi
–host=arm-none-linux-gnueabi
–enable-rpath
Make and install
make
make install
Copy the lib files to the target board
[on the target board]
lrwxrwxrwx 1 root root 20 Jan 1 00:46
/usr/local/lib/libSDL-1.2.so.0 -> libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 954098 Jan 1 00:38
/usr/local/lib/libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 1388774 Jan 1 00:38
/usr/local/lib/libSDL.a
-rwxr-xr-x 1 root root 946 Jan 1 00:38
/usr/local/lib/libSDL.la
lrwxrwxrwx 1 root root 20 Jan 1 00:46
/usr/local/lib/libSDL.so -> libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 3666 Jan 1 00:38
/usr/local/lib/libSDLmain.a
Write an easy sample code
#include <stdlib.h>
#include <stdio.h>
#include “SDL.h”
main(int argc, char *argv[])
{
printf("\n\n======>1\n");
if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, “Unable to init SDL: %s\n”, SDL_GetError());
exit(1);
}
printf("\n\n======>2\n");
atexit(SDL_Quit);
}
Compile
$ arm-none-linux-gnueabi-gcc -I/usr/local/include/SDL -L/usr/local/lib -lSDL
hello.c -o hello
cc1: warning: include location “/usr/local/include/SDL” is unsafe for
cross-compilation
/home/acos/CodeSourcery/Sourcery_G++_Lite/bin/…/lib/gcc/arm-none-linux-gnueabi/4.3.2/…/…/…/…/arm-none-linux-gnueabi/bin/ld:
warning: library search path “/usr/local/lib” is unsafe for
cross-compilation
Execute hello
[on board]
sh hello
hello: line 1: syntax error: unexpected word (expecting “)”)
./hello
./hello: error while loading shared libraries: /lib/libSDL-1.2.so.0: ELF
file version does not match current one
any one can help me…? PLEASE–
??? Yu-Sheng, Wang
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH ./hello
or static build:
$ arm-none-linux-gnueabi-gcc test.c -o hello -static
-I/usr/include/SDL -L/usr/lib -Wl,-Bstatic -lSDL -lpthread -ldl -lm
2010/7/22, Yu-Sheng, Wang :> Hi,
I encounter some problems during making the library,
I would like to port SDL library on my embedded device,
My devices is OMAP 3621 (ARMv7), operating system is Linux 2.6.32.7,
and I use Sourcery G++ Lite 2008q3-72 as the toolchain,
below is my process…
configure
./configure
–enable-static
–enable-shared
–enable-audio
–enable-video
–enable-loadso
–enable-nanox-direct-fb
–enable-video-fbcon
–enable-video-directfb
–disable-esd
–target=arm-none-linux-
gnueabi
–host=arm-none-linux-gnueabi
–enable-rpath
Make and install
make
make install
Copy the lib files to the target board
[on the target board]
lrwxrwxrwx 1 root root 20 Jan 1 00:46
/usr/local/lib/libSDL-1.2.so.0 -> libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 954098 Jan 1 00:38
/usr/local/lib/libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 1388774 Jan 1 00:38
/usr/local/lib/libSDL.a
-rwxr-xr-x 1 root root 946 Jan 1 00:38
/usr/local/lib/libSDL.la
lrwxrwxrwx 1 root root 20 Jan 1 00:46
/usr/local/lib/libSDL.so -> libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 3666 Jan 1 00:38
/usr/local/lib/libSDLmain.a
Write an easy sample code
#include <stdlib.h>
#include <stdio.h>
#include “SDL.h”
main(int argc, char *argv[])
{
printf("\n\n======>1\n");
if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, “Unable to init SDL: %s\n”, SDL_GetError());
exit(1);
}
printf("\n\n======>2\n");
atexit(SDL_Quit);
}
Compile
$ arm-none-linux-gnueabi-gcc -I/usr/local/include/SDL -L/usr/local/lib -lSDL
hello.c -o hello
cc1: warning: include location “/usr/local/include/SDL” is unsafe for
cross-compilation
/home/acos/CodeSourcery/Sourcery_G++_Lite/bin/…/lib/gcc/arm-none-linux-gnueabi/4.3.2/…/…/…/…/arm-none-linux-gnueabi/bin/ld:
warning: library search path “/usr/local/lib” is unsafe for
cross-compilation
Execute hello
[on board]
sh hello
hello: line 1: syntax error: unexpected word (expecting “)”)
./hello
./hello: error while loading shared libraries: /lib/libSDL-1.2.so.0: ELF
file version does not match current one
any one can help me…? PLEASE
–
??? Yu-Sheng, Wang
Thnaks reply,
while I use the command Andrey provide, I encounter other problem,
collect the infomation:
$ arm-none-linux-gnueabi-gcc hello.c -o hello -static
-I/usr/local/include/SDL -L/usr/local/lib -Wl,-Bstatic -lSDL -lpthread -ldl
-lm
cc1: warning: include location “/usr/local/include/SDL” is unsafe for
cross-compilation
/home/acos/CodeSourcery/Sourcery_G++_Lite/bin/…/lib/gcc/arm-none-linux-gnueabi/4.3.2/…/…/…/…/arm-none-linux-gnueabi/bin/ld:
warning: library search path “/usr/local/lib” is unsafe for
cross-compilation
/usr/local/lib/libSDL.a(SDL_DirectFB_video.o): In function
SetDirectFBerror': /home/acos/SDL-1.2.14/./src/video/directfb/SDL_DirectFB_video.c:220: undefined reference to
DirectFBErrorString’
/usr/local/lib/libSDL.a(SDL_DirectFB_video.o): In function
DirectFB_SetVideoMode': /home/acos/SDL-1.2.14/./src/video/directfb/SDL_DirectFB_video.c:632: undefined reference to
DirectFBError’
/usr/local/lib/libSDL.a(SDL_DirectFB_video.o): In function
DirectFB_VideoInit': /home/acos/SDL-1.2.14/./src/video/directfb/SDL_DirectFB_video.c:389: undefined reference to
DirectFBInit’
/home/acos/SDL-1.2.14/./src/video/directfb/SDL_DirectFB_video.c:396:
undefined reference to `DirectFBCreate’
collect2: ld returned 1 exit statusOn Sat, Jul 24, 2010 at 3:14 AM, Andrey A. wrote:
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH ./hello
or static build:
$ arm-none-linux-gnueabi-gcc test.c -o hello -static
-I/usr/include/SDL -L/usr/lib -Wl,-Bstatic -lSDL -lpthread -ldl -lm
2010/7/22, Yu-Sheng, Wang <@Yu-Sheng_Wang>:
Hi,
I encounter some problems during making the library,
I would like to port SDL library on my embedded device,
My devices is OMAP 3621 (ARMv7), operating system is Linux 2.6.32.7,
and I use Sourcery G++ Lite 2008q3-72 as the toolchain,
below is my process…
configure
./configure
–enable-static
–enable-shared
–enable-audio
–enable-video
–enable-loadso
–enable-nanox-direct-fb
–enable-video-fbcon
–enable-video-directfb
–disable-esd
–target=arm-none-linux-
gnueabi
–host=arm-none-linux-gnueabi
–enable-rpath
Make and install
make
make install
Copy the lib files to the target board
[on the target board]
lrwxrwxrwx 1 root root 20 Jan 1 00:46
/usr/local/lib/libSDL-1.2.so.0 -> libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 954098 Jan 1 00:38
/usr/local/lib/libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 1388774 Jan 1 00:38
/usr/local/lib/libSDL.a
-rwxr-xr-x 1 root root 946 Jan 1 00:38
/usr/local/lib/libSDL.la
lrwxrwxrwx 1 root root 20 Jan 1 00:46
/usr/local/lib/libSDL.so -> libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 3666 Jan 1 00:38
/usr/local/lib/libSDLmain.a
Write an easy sample code
#include <stdlib.h>
#include <stdio.h>
#include “SDL.h”
main(int argc, char *argv[])
{
printf("\n\n======>1\n");
if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, “Unable to init SDL: %s\n”, SDL_GetError());
exit(1);
}
printf("\n\n======>2\n");
atexit(SDL_Quit);
}
Compile
$ arm-none-linux-gnueabi-gcc -I/usr/local/include/SDL -L/usr/local/lib
-lSDL
hello.c -o hello
cc1: warning: include location “/usr/local/include/SDL” is unsafe for
cross-compilation
/home/acos/CodeSourcery/Sourcery_G++_Lite/bin/…/lib/gcc/arm-none-linux-gnueabi/4.3.2/…/…/…/…/arm-none-linux-gnueabi/bin/ld:
warning: library search path “/usr/local/lib” is unsafe for
cross-compilation
Execute hello
[on board]
sh hello
hello: line 1: syntax error: unexpected word (expecting “)”)
./hello
./hello: error while loading shared libraries: /lib/libSDL-1.2.so.0: ELF
file version does not match current one
any one can help me…? PLEASE
–
??? Yu-Sheng, Wang
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
??? Yu-Sheng, Wang
JonnyD
July 26, 2010, 12:03pm
5
It sounds like you’re trying to use standard include directories. You
should be using those of the cross-compiler.
Jonny D
2010/7/25 Yu-Sheng, Wang > Thnaks reply,
while I use the command Andrey provide, I encounter other problem,
collect the infomation:
$ arm-none-linux-gnueabi-gcc hello.c -o hello -static
-I/usr/local/include/SDL -L/usr/local/lib -Wl,-Bstatic -lSDL -lpthread -ldl
-lm
cc1: warning: include location “/usr/local/include/SDL” is unsafe for
cross-compilation
/home/acos/CodeSourcery/Sourcery_G++_Lite/bin/…/lib/gcc/arm-none-linux-gnueabi/4.3.2/…/…/…/…/arm-none-linux-gnueabi/bin/ld:
warning: library search path “/usr/local/lib” is unsafe for
cross-compilation
/usr/local/lib/libSDL.a(SDL_DirectFB_video.o): In function
SetDirectFBerror': /home/acos/SDL-1.2.14/./src/video/directfb/SDL_DirectFB_video.c:220: undefined reference to
DirectFBErrorString’
/usr/local/lib/libSDL.a(SDL_DirectFB_video.o): In function
DirectFB_SetVideoMode': /home/acos/SDL-1.2.14/./src/video/directfb/SDL_DirectFB_video.c:632: undefined reference to
DirectFBError’
/usr/local/lib/libSDL.a(SDL_DirectFB_video.o): In function
DirectFB_VideoInit': /home/acos/SDL-1.2.14/./src/video/directfb/SDL_DirectFB_video.c:389: undefined reference to
DirectFBInit’
/home/acos/SDL-1.2.14/./src/video/directfb/SDL_DirectFB_video.c:396:
undefined reference to `DirectFBCreate’
collect2: ld returned 1 exit status
On Sat, Jul 24, 2010 at 3:14 AM, Andrey A. wrote:
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH ./hello
or static build:
$ arm-none-linux-gnueabi-gcc test.c -o hello -static
-I/usr/include/SDL -L/usr/lib -Wl,-Bstatic -lSDL -lpthread -ldl -lm
2010/7/22, Yu-Sheng, Wang :
Hi,
I encounter some problems during making the library,
I would like to port SDL library on my embedded device,
My devices is OMAP 3621 (ARMv7), operating system is Linux 2.6.32.7,
and I use Sourcery G++ Lite 2008q3-72 as the toolchain,
below is my process…
configure
./configure
–enable-static
–enable-shared
–enable-audio
–enable-video
–enable-loadso
–enable-nanox-direct-fb
–enable-video-fbcon
–enable-video-directfb
–disable-esd
–target=arm-none-linux-
gnueabi
–host=arm-none-linux-gnueabi
–enable-rpath
Make and install
make
make install
Copy the lib files to the target board
[on the target board]
lrwxrwxrwx 1 root root 20 Jan 1 00:46
/usr/local/lib/libSDL-1.2.so.0 -> libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 954098 Jan 1 00:38
/usr/local/lib/libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 1388774 Jan 1 00:38
/usr/local/lib/libSDL.a
-rwxr-xr-x 1 root root 946 Jan 1 00:38
/usr/local/lib/libSDL.la
lrwxrwxrwx 1 root root 20 Jan 1 00:46
/usr/local/lib/libSDL.so -> libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 3666 Jan 1 00:38
/usr/local/lib/libSDLmain.a
Write an easy sample code
#include <stdlib.h>
#include <stdio.h>
#include “SDL.h”
main(int argc, char *argv[])
{
printf("\n\n======>1\n");
if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, “Unable to init SDL: %s\n”, SDL_GetError());
exit(1);
}
printf("\n\n======>2\n");
atexit(SDL_Quit);
}
Compile
$ arm-none-linux-gnueabi-gcc -I/usr/local/include/SDL -L/usr/local/lib
-lSDL
hello.c -o hello
cc1: warning: include location “/usr/local/include/SDL” is unsafe for
cross-compilation
/home/acos/CodeSourcery/Sourcery_G++_Lite/bin/…/lib/gcc/arm-none-linux-gnueabi/4.3.2/…/…/…/…/arm-none-linux-gnueabi/bin/ld:
warning: library search path “/usr/local/lib” is unsafe for
cross-compilation
Execute hello
[on board]
sh hello
hello: line 1: syntax error: unexpected word (expecting “)”)
./hello
./hello: error while loading shared libraries: /lib/libSDL-1.2.so.0: ELF
file version does not match current one
any one can help me…? PLEASE
–
??? Yu-Sheng, Wang
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
??? Yu-Sheng, Wang
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org