Re: [AD] void* conversion errors in kcm_audio/openal.c |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] void* conversion errors in kcm_audio/openal.c
- From: Evert Glebbeek <eglebbk@xxxxxxxxxx>
- Date: Wed, 8 Jul 2009 15:49:36 -0400
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