[SDL] Attempting to make SDL wrapper for QB64 - First hurdle!

Unseen Machine jmonyon at yahoo.co.uk
Mon Dec 6 13:24:45 PST 2010


I have Google'd myself silly trying to figure this out! Any ideas on what i might be doing wrong?

I am attemtping to make a dll that will provide access to functions for QB64 that it cannot currently access. Here's my first function. It does not work!


Code:
SDL_LINK_API int SDL_Link_NumJoys(void)
{
	if(SDL_Init(SDL_INIT_JOYSTICK)== -1)
	{
		return -1;
	}
	else
	{
		return SDL_NumJoysticks;
	}
}





It returns   error C2440: 'return' : cannot convert from 'int (__cdecl *)(void)' to 'int'

I am using VC++2008, any help would be great. Thanks folks.

John




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20101206/771adb42/attachment-0007.htm>


More information about the SDL mailing list