Re: [AD] void* conversion errors in kcm_audio/openal.c

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Yep, C++, but that's what CMake set it to. Why is dsound.cpp in there if it's supposed to be C?

Changing it to C yields 47 errors: http://p.baf.cc/156
(This is on an unmodified checkout, using default CMake parameters except for path information.)

That first error comes from extern "C" in dsound.cpp.

On Wed, Jul 8, 2009 at 3:49 PM, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
On 8 Jul 2009, at 15:25 , Kibiz0r wrote:
> Using MSVC 9.0:
>
> Error 1       error C2440: 'initializing' : cannot convert from 'void *'
> to 'ALLEGRO_AL_DATA *'        c:\AllegroNet\Allegro\allegro\addons\kcm_audio
> \openal.c     254     kcm_audio
<snip>
> Error 10      error C2440: 'initializing' : cannot convert from 'void *'
> to 'ALLEGRO_AL_DATA *'        c:\AllegroNet\Allegro\allegro\addons\kcm_audio
> \openal.c     632     kcm_audio
>
> I added the casts (attached) but that gave me a linker error that I
> can't figure out.

Are you compiling that file as a C or a C++ file?
It shouldn't need the casts if it's compiled as C code (in fact, it
argualy *shouldn't* have the casts).

> _al_voice_update is clearly defined in kcm_voice.c. dsound.cpp
> references it as well, and resolved without a problem. Changing the
> definition of _al_voice_update to _al_voice_update2 makes dsound.obj
> fail in a different way than openal.obj:
>
> Error 1       error LNK2019: unresolved external symbol __al_voice_update
> referenced in function __dsound_update        dsound.obj      kcm_audio
>
> Any ideas?

Again, check if you're actually compiling that file as a C file, not a
C++ file. It seems to me that both problems may be caused by
incorrectly compiling it as C++... I don't know for sure though.

Evert

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
--
https://lists.sourceforge.net/lists/listinfo/alleg-developers



--
Michael Harrington | Software Apprentice
Atomic Object | http://atomicobject.com
[Ph] +1 616 776 6020 [Fx] +1 616 776 6015


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/