0

I'm having an error in this simple program ... I get a windows warning which has the following message

"Launching SDL basic.exe has encountered a problem. The program file specified in the launch configuration does not exist."

In the console i get the following error "Undefined reference to winmain16. I have linked the header file and a library as well...I was using code blocks and i recently changed ide to eclipse so i want your answers as detailed and simple as possible... My OS is Windows 7 64-bit...

#include <iostream>
#include <SDL.h>
using namespace std;
int main()
{
cout << "!!Hello World!!"<< endl;
return 0;
}
  • I forgot to mention that this is my first step into graphic programs after having downloaded sdl – user5000837 Jun 11 '15 at 20:34
  • you don't need to comment, you can edit your post. And please provide more details in the tags. Which Windows version do you target ? – Marged Jun 11 '15 at 20:36
  • Next time search before asking. – Lightness Races in Orbit Jun 11 '15 at 21:23
  • Sorry ...im new to this ...i was searching for a long time ...and i didnt find any questions that suited to my situation....i tried some of the things that was suggested in other questions that failed to change the error or produced more though... – user5000837 Jun 12 '15 at 12:33

1 Answers1

0

You need to provide something like this:

int CALLBACK WinMain(
  _In_ HINSTANCE hInstance,
  _In_ HINSTANCE hPrevInstance,
  _In_ LPSTR     lpCmdLine,
  _In_ int       nCmdShow
);

This is the "real" main entry point into your program.

Marged
  • 10,577
  • 10
  • 57
  • 99