The source code:
#ifdef WIN32
#pragma comment(lib, “SDL.lib”)
#pragma comment(lib, “SDLmain.lib”)
#endif
#include “SDL.h”
#include <stdio.h>
int main()
{
printf(“Initializing SDL.\n”);
/* Initialize defaults, Video and Audio */
if(SDL_Init( SDL_INIT_VIDEO ) < 0 ) {
printf("Could not initialize SDL: %s.\n", SDL_GetError());
SDL_Quit();
}
printf("SDL initialized.\n");
printf("Quiting SDL.\n");
/* Shutdown all subsystems */
SDL_Quit();
printf("Quiting....\n");
return(0);
}
‘SDLmain.lib(SDL_win32_main.obj) : error LNK2001: unresolved external symbol _SDL_main’
'Debug/test.exe : fatal error LNK1120: 1 unresolved externals’
these are error display under vc6.0
but the programme can run under linux.
when i chang ‘int main()’ to ‘int main(int argc, char **argv)’,that is ok under vc6.0
what is the problem?