entry point must be defined???

Started by
13 comments, last by IvanYosifov 12 years, 10 months ago
It seems wierd that noone else suggest this, so I have a feeling I'm wrong, but doesn't that just mean that you are missing a "main" function (aka the entry point for your program)? I belive SDL has a special definition of what main should look like too (I'm sure it's in the docs somewhere).

Matt
__________________________________[ Website ] [ Résumé ] [ [email=contact[at]matthughson[dot]com]Contact[/email] ][ Have I been Helpful? Hook me up! ]
Advertisement
If you are doing your project in debug mode, you need to change your DLL type to Multithreaded Debug DLL.
Quote:Original post by matthughson
It seems wierd that noone else suggest this, so I have a feeling I'm wrong, but doesn't that just mean that you are missing a "main" function (aka the entry point for your program)? I belive SDL has a special definition of what main should look like too (I'm sure it's in the docs somewhere).

Matt


Only kinda...it converts other main functions to SDL_main. By using regular main(), you satisfy MSVC's expectations, and SDL uses some kind o' macro to satisfy SDL's expectations.

Before coding:

  1. Turn on multi-threaded DLLs.
  2. Put the DLL in your project folder (or system folder, but I recommend against it).
  3. Set up your compiler's include path to the SDL SDK folder
  4. Set up your compiler's library path to the SDL SDK folder
  5. Include SDL headers
  6. Input Library files to the linker (with #pragma in MSVC)


I use:
#include <SDL.h>#include <SDL_main.h>#ifdef WIN32#pragma comment(lib,"SDL.lib")#pragma comment(lib,"SDL_main.lib")#endifint main(int argc, char** argv){return 0;}


XBox 360 gamertag: templewulf feel free to add me!
Check my first post about the linker options. This is specific to SDL and VC 8.0 (which Express 2k5 uses).
Ive had this error. And I can only tell you this - something is wrong with your main function - check carefully whether you wrote it precisely as it should be. Different projects require different versions of main so check its correct spelling.

This topic is closed to new replies.

Advertisement