Jump to content
Posted 03 June 2005 - 02:08 PM
Posted 03 June 2005 - 02:12 PM
Select: Projects->VC++ Directories
Add an entry for the SDL installation location (add for src, lib, header dirs etc..)
Now after you create your project:
Right click your project icon (after you open it in the right hand scrollable box) and select properties.
Select the tab called "Librarian" or "Linker" and add an entry for your specific SDL dll file (usualy the dll name + ".lib") in the "Additional Dependancies" box.
Posted 03 June 2005 - 04:23 PM
Posted 03 June 2005 - 06:48 PM
main.obj : error LNK2005: _SDL_main already defined in game.obj
LINK : fatal error LNK1104: cannot open file 'uuid.lib'
Posted 08 June 2005 - 05:48 AM
Posted 08 June 2005 - 06:34 AM
#include "C:\\Program Files\\SDL-1.2.8\\include\\SDL.h"3. Now since you can't set directories and you need to add in library files, you must add those library files to the project. Right click on your project in the 'Solution Explorer' and choose "Add->Existing Item..." Now navigate to the /lib folder for SDL and add in the the SDL.lib and SDLMain.lib. Hit No on the new dialog, or if you hit Yes, then hit cancel.
#include "C:\\Program Files\\SDL-1.2.8\\include\\SDL.h"
Uint8 *g_Keys = 0;
bool g_Done = 0;
int g_Width = 640;
int g_Height = 480;
int g_BPP = 32;
int g_Flags = SDL_DOUBLEBUF | SDL_HWSURFACE;
Dest.x = 300;
Dest.y = 200;
Dest.w = 100;
Dest.h = 100;
void ProcessEvents( SDL_Event &event )
if ( event.type == SDL_QUIT )
g_Done = 1;
g_Keys = SDL_GetKeyState( 0 );
if( g_Keys[ SDLK_ESCAPE ] )
g_Done = 1;
SDL_FillRect( g_Screen, &Dest, 0x00FF00 );
int main(int argc, char *argv)
if ( SDL_Init(SDL_INIT_VIDEO) < 0 )
printf("Unable to init SDL: %s\n", SDL_GetError());
if( !Initialize() )
if ( NULL == SDL_SetVideoMode( g_Width, g_Height, g_BPP, g_Flags ) )
g_Screen = SDL_GetVideoSurface();
while( g_Done == false )
while ( SDL_PollEvent(&event) )
ProcessEvents( event );
SDL_FillRect( g_Screen, NULL, 0x000000 );
SDL_Flip( g_Screen );
Posted 08 June 2005 - 11:29 AM
Posted 09 June 2005 - 02:44 AM
Posted 09 June 2005 - 06:56 PM
Original post by neodingo
Visual C++ 2005 Beta 2 works just fine with setting directories up, its under Tools | Options...
Note: For Beta 2, you cannot set the Visual C++ Directories in the Options dialog of Visual C++ Express Edition. To work around this issue, you can update the Visual C++ Directories by modifying the VCProjectEngine.dll.express.config file located in the \vc\vcpackages subdirectory of the Visual C++ Express Edition install location. Please make sure that you also delete the file "vccomponents.dat" located in the "%USERPROFILE%\Local Settings\Application Data\Microsoft\VCExpress\8.0" if it exists before restarting Visual C++ Express Edition.
Posted 10 June 2005 - 01:22 AM
Original post by Yamian
I tried to do it the same way they say to do the Platform SDK
Posted 10 June 2005 - 02:04 PM
Posted 15 June 2005 - 05:33 AM
Posted 19 June 2005 - 10:26 AM