Problem with SDL and Visual C++ Express

Hello,
I have a problem compiling a simple project that use SDL with Visual C++
Express.

The same project compile and run ok with :
-MS Visual C++ 5.0 Learning Edition
-MS Visual Studio 6.0
-Dev-C++
-gcc ( on Linux Mandrake 10.1 )

I have tried to understand why but it seems i dont find a solution .

So i write a sample and i have found this :

#include <stdlib.h>
#include <stdio.h>

#include “SDL.h”

int main (int argc, char **argv)
{

if(SDL_Init(SDL_INIT_VIDEO)<0){printf(“ERROR!!!\n”);}
else{printf(“SUCCESS!!!\n”);};

SDL_Delay(3000);

SDL_Quit();

return 0;

}

Well, in this case it compile right with no problem.

At runtime this happen:
it execute all funcition , but at the program exit it crash .

I dont know if can be usefull but the debugger start to say for example :

Unhandled exception at 0xd6351336 in TEST.exe: 0xC0000005: Access violation
reading location 0xd6351336.

to continue you are forced to add a break point, then the application
crash (abnormal termination).

on the output we have :

‘TEST.exe’: Unloaded ‘C:\WINDOWS\system32\dinput.dll’
‘TEST.exe’: Unloaded ‘C:\WINDOWS\system32\setupapi.dll’
‘TEST.exe’: Unloaded 'C:\WINDOWS\system32\hid.dll’
First-chance exception at 0xd6351336 in TEST.exe: 0xC0000005: Access
violation
reading location 0xd6351336.
Unhandled exception at 0xd6351336 in TEST.exe: 0xC0000005: Access violation
reading location 0xd6351336.

The compiler version is :
Microsoft Visual C++ 2005
Version 8.0.40670.16

The SDL version is :
1.2.8
SDL-devel-1.2.8-VC6.zip (Visual C++ 5,6,7)

How can i solve this problem ?

Thanks in advance .

Alberto Glarey