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

Unseen Machine jmonyon at yahoo.co.uk
Mon Dec 6 14:10:22 PST 2010

But i have just managed to create new errors! LOL!!

QB64 really has moved on, i have made a 2d game engine in it, thats why i after the joystick first!

Here is my header file and .cpp file 

the new errors are the same as each other, the braces seemd to solve the other problem,

1>SDL_Link.obj : error LNK2019: unresolved external symbol _SDL_NumJoysticks referenced in function _SDL_Link_NumJoys

#define SDL_LINK_API __declspec(dllexport)
#define SDL_LINK_API __declspec(dllimport)

// This class is exported from the SDL_Link.dll
class SDL_LINK_API CSDL_Link {
	// TODO: add your methods here.

extern "C" SDL_LINK_API int SDL_Link_NumJoys(void);

SDL_LINK_API int fnSDL_Link(void);

// SDL_Link.cpp : Defines the exported functions for the DLL application.

#include "stdafx.h"
#include "SDL_Link.h"
#include "SDL.h"

SDL_LINK_API int SDL_Link_NumJoys(void)
	if(SDL_WasInit(SDL_INIT_JOYSTICK)== -1)
		return -1;
		return SDL_NumJoysticks(); 

// This is the constructor of a class that has been exported.
// see SDL_Link.h for the class definition

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20101206/131876c8/attachment-0008.htm>

More information about the SDL mailing list