Error occurs as shown below:
Code:
$bcc32.exe -b -c -tW -DWIN32 sdltest.c -lSDL -lSDLmain
Borland C++ 5.6.1 for Win32 Copyright (c) 1993, 2002 Borland
sdltest.c:
Warning W8057 sdltest.c 13: Parameter 'argc' is never used in function SDL_main
Warning W8057 sdltest.c 13: Parameter 'argv' is never used in function SDL_main
$ilink32.exe -aa -Tpe -c sdltest.obj SDL.lib import32.lib c0w32.obj cw32.lib
Turbo Incremental Link 5.62 Copyright (c) 1997-2002 Borland
Error: Unresolved external 'WinMain' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\C0W32.OBJ
Here's sdltest.c:
Code:
#include <stdio.h>
#include <SDL.h>
int main (int argc, char **argv)
{
if (SDL_Init(SDL_INIT_AUDIO | SDL_INIT_VIDEO) < 0) {
fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
return 1;
}
SDL_Quit();
return 0;
}
I installed SDL and then the Borland libraries from Borland.zip that came with and then put their paths in bcc32.cfg and ilink32.cfg so that they pointed to the include dir and borland library dir respectively. The SDL faq and documentation doesn't have this problem listed and the parameters on the commandline should be correct.