[freespace2] Build errors with gcc 4.0 on Debian Sid
Taylor Richards
mtrs at bellsouth.net
Wed Nov 2 12:43:57 EST 2005
It works fine with GCC 4, you are probably just using a newer version of
OpenAL than is supported at the moment. If you are using a CVS version
of OpenAL (1.1) then you'll have to make these changes:
Change line 590 from:
void *ds_sound_context = NULL;
to
ALCcontext *ds_sound_context = NULL;
Change line 1555 from:
AL_play_position = alIsExtensionPresent(
(ALubyte*)"AL_LOKI_play_position" );
to:
AL_play_position = alIsExtensionPresent( (ALchar*)"AL_LOKI_play_position" );
and that should get it compiling again. There are reportedly some sound
problems using OpenAL 1.1 for Linux though so be aware of that. I don't
plan on making it fully 1.1 compatible until the Linux version is
actually up to the 1.1 spec. The basic code is fine and works ok with
the OS X and Windows versions of OpenAL 1.1 but the Linux version of
OpenAL 1.1 appears to cause the sound issues currently.
Taylor
Adam Mercer wrote:
> Hi
>
> Getting the following build errors with using gcc-4.0.1 from Debian Sid:
>
> g++ -c -o src/sound/ds.o src/sound/ds.cpp -Wall -g -DPLAT_UNIX
> -I/usr/include/SDL -D_REENTRANT -Iinclude/ -fsigned-char
> -Wno-format-y2k -DRELEASE_REAL
> src/sound/ds.cpp: In function 'int ds_init(int, int)':
> src/sound/ds.cpp:1496: error: invalid conversion from 'ALCubyte*' to
> 'const ALchar*'
> src/sound/ds.cpp:1496: error: initializing argument 1 of 'ALCdevice*
> alcOpenDevice(const ALchar*)'
> src/sound/ds.cpp:1555: error: invalid conversion from 'ALubyte*' to
> 'const ALchar*'
> src/sound/ds.cpp:1555: error: initializing argument 1 of 'ALboolean
> alIsExtensionPresent(const ALchar*)'
> make: *** [src/sound/ds.o] Error 1
>
> Is it just that the compilers too new?
>
> Cheers
>
> Adam
>
--
Taylor Richards <taylor at icculus.org>
More information about the freespace2
mailing list