I have installed the compiler etc… Read the BorlandC.html… Extracted
the .mak files… This all seems to be working correctly, however… I get
this error:
Error E2034 …\src\audio\SDL_audio.c 433: Cannot convert ‘void *’ to
’unsigned char *’ in function SDL_OpenAudio(SDL_AudioSpec *,SDL_AudioSpec *)
*** 1 errors in Compile ***
Any ideas?
I’m tempted not to post because it can’t be this…
There’s a single instance where exactly that kind of error (“cannot
void* -> blah*”) crops up over & over again. Compiler’s in C++ mode.
…but then I figured perhaps those borland makefiles are machine
generated or perhaps your *.CFG files aren’t correct. Anyway, whilst you
can’t force C mode upon the borland compiler (it goes by file extender)
you can force C++ mode upon it via “-P” (same as gcc -x). It may be
there’s a “-P” to be rooted out.
If desperate to discover what’s going on “in-situ”, just rename
SDL_audio.c to something else for a moment then try this…
<SDL_audio.c>
#ifdef __cplusplus
pragma message “C++ mode”
extern "C" void * foo(void);
#else
pragma message “C mode”
extern void * foo(void);
#endif
static void
blah(void)
{char *p=foo();p;}
</SDL_audio.c>
…then try and build again. Compilation will suceed in C mode (won’t
link of course), but fail in C++ mode giving identical error to the one
you posted. The pragmas should tell you but as there’s a way to supress
them bear in mind you may not see their message.
Come to think of it, if the make does still fail with the above, try it
stand-alone from the command-line (bcc32 -c SDL_audio.c): failure again
almost certainly means *.CFG (ie it’s you) and success means something
in the borland sdl makefile.On Fri, 30 Aug 2002 12:36:02 -0400, “Waller, Ronald” <Ronald.Waller at FMR.COM> wrote:
–
swamp-dog at ntlworld.com