On Sun, 2004-04-18 at 18:52, Cory Johns wrote:
> As chromatic noted, Build::SDL::Win32 was originally missing. With
> the newest snapshot he uploaded, I found that
> Build::SDL::Win32::subsystems() and Build::SDL::Win32::libraries()
> were not returning the correct thing. Adding return $subsystems; or
> return $libraries; as appropriate (which chromatic has informed me he
> corrected in the snapshot), I got the error: Unknown library
> 'opengl32' for 'OpenGL'
> I was able to correct this by changing:
> return [qw( opengl32 glu32 )];
> in Build::SDL::Win32::ms_gl_subsystems() to:
> return [qw( OpenGL GLU )];
Interesting. Can you provide the value of the environment variable
SDL_GL_VENDOR? I presume it's either 'MESA' or 'MS', or gl_vendor()
would die. On the other hand, it could be empty, in which case we need
to make another guess somewhere and somehow.
Also, what are the names of your OpenGL DLLs? I can guess they're
probably 'OpenGL.dll' and 'GLU.dll'.
> Then, I got the following errors:
>
> Use of uninitialized value in substitution (s///) at
> build_lib/SDL\Build\MSWin32.pm line 23.
What are the values of your LIBS and PATH environment variables? If
these aren't set correctly (or we're not guessing correctly), it'll
cause these errors. I think they may cascade from guessing library
paths and file names incorrectly.
> I got rid of the uninitialized value errors by adding the line:
> $libraries->{OpenGL}{header} = 'gl.h';
Hmm, what's in your INCLUDE variable?
> to Build::SDL::Win32::libraries(), and I got rid of the sdl-config
> error by changing the error (in compile_flags() and link_flags() in
> build_lib\SDL\Build.pm) to:
> if($^O !~ /win32/i and $? >> 8) {
> die "sdl-config does not appear to be in your path.\n" .
> "Please check your config and try again.\n";
> }
>
> That got me:
> Checking whether your kit is complete...
> Looks good
> 'sdl-config' is not recognized as an internal or external command,
> operable program or batch file.
> Can't use an undefined value as an ARRAY reference at
> build_lib/SDL/Build.pm line 245.
>
> Turns out that $includes->{$subsystem} and $defines->{$subsystem} were
> both empty, so I changed the appropriate lines in set_flags() to:
> @{ $includes->{$subsystem} || [] },
That's a consequence of not finding the libraries or headers...
> Generating script 'src\.lds'
> link @"src\.lds" -out:"blib\arch\auto\SDL_perl\SDL_perl.dll"
> LINK : fatal error LNK1104: cannot open file "src\.def"
> LINK : fatal error LNK1141: failure during build of exports file
... as are these, I believe.
> Oh, also SDL_perl.xs seems to #include <SDL.h>, while OpenGL.xs uses
> #include <SDL/SDL.h>. I worked around this by making two copies of
> the header files, but I imagine it would be better for them to look in
> the same place (unless, of course, I'm missing something?)
It would be better for them to point to the same place; probably SDL.h.
> In case it's important, I've set the following environment variables:
> set INCLUDE=C:\Program Files\SDL-1.2.7\include;%INCLUDE%
> set PATH=C:\Program Files\SDL-1.2.7\lib;%PATH%
> set LIBS=C:\Program Files\SDL-1.2.7\lib;%LIBS%
>
> That's where I'm stuck. Apparently, HAVE_GL isn't being defined for
> OpenGL.xs, but I'm not sure why. Any help would be appreciated.
Where are your OpenGL dlls and header files? Do you have an OpenGL
development kit installed somewhere? Do you need one to compile and
link against an OpenGL dll? (I would think so, but I'm not a Windows
programmer.)
-- c