Subject: | linkage problem in Build.pm |
Hello,
I experience linking problem when building full-featured SDL_Perl on my Linux box. I managed to track down the problem: word splitting does not happen when passing arguments to gcc, so something like
gcc "-lSDL -lGL -lGLU"
actually does not work.
I attached the patch that fixes the problem for me.
--
Alexey Tourbin
ALT Linux Team
--- SDL_Perl-2.1.2/make/lib/SDL/Build.pm- 2004-09-24 00:36:56 +0000
+++ SDL_Perl-2.1.2/make/lib/SDL/Build.pm 2004-11-28 14:52:42 +0000
@@ -143,14 +143,14 @@ sub set_flags
extra_compiler_flags =>
[
@{ $includes->{$subsystem} },
- $sdl_compile,
+ split(' ', $sdl_compile),
@{ $defines->{$subsystem} },
( defined $Config{usethreads} ? ('-DUSE_THREADS', '-fPIC') : '-fPIC' ),
],
extra_linker_flags =>
[
@{ $links->{$subsystem}{paths} },
- $sdl_link,
+ split(' ', $sdl_link),
@{ $links->{$subsystem}{libs} },
],
},