I've setup SDL under Visual Studio 03 to use with OpenGL, and I can include the SDL.h and SDL_opengl.h headers alright, but when I try to run OpenGL commands the compiler doesnt recognise them and gives the 'unresolved external symbol' error, and I cant really figure out why. I setup SDL by:
Copied SDL.lib and SDLmain.lib to Microsoft Visual Studio .NET 2003\Vc7\lib
Copied the SDL .h files in the zip's include folder to Microsoft Visual Studio .NET 2003\Vc7\Include\SDL
Copied SDL.dll to Windows\System32
Set the Project Properties --> Cplusplus --> Code Generation --> Runtime Library to: Multi-threaded DLL
Set the Project Properties --> Linker --> Input --> Additional Dependencies to: SDL.lib SDLmain.lib
I can compile this code ok:
#include "SDL/SDL.h"
#include "SDL/SDL_opengl.h"
int main(int argc, char* args[])
{
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Quit();
return 0;
}
But when I try to include an OpenGL command I get the 'unresolved external symbol' error:
#include "SDL/SDL.h"
#include "SDL/SDL_opengl.h"
void initOpenGL()
{
glClearColor(0,0,0,0);
}
int main(int argc, char* args[])
{
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Quit();
return 0;
}
Would anyone have any ideas what might be the problem, as none of the guides I read mentioned anything additional being required to get SDL_opengl up and running.
Thanks all