Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML_Main in C?  (Read 7116 times)

0 Members and 1 Guest are viewing this topic.

KLF

  • Newbie
  • *
  • Posts: 2
    • View Profile
SFML_Main in C?
« on: March 09, 2009, 06:50:21 am »
Hello, I'm trying to use the C version of SFML 1.4 but I've run in to a couple of problems. Hopefully someone can help me?

One of the window tutorials recommends linking to sfml-main.lib to have a WinMain() provided for you - however this lib doesn't seem to be included in the C SDK. I'm guessing it's not a good idea to try using the version from the C++ SDK? What should I do here? My program is meant to be cross platform, and even though I'm building on windows with mingw I'm not a windows developer, so I would prefer to use the lib rather than make my own WinMain.

I also have the same problem as deltaphc in an earlier thread: when compiling I get a "redefinition of typedef 'sfRenderWindow'" error. I see that it's already been fixed, but the download from the SFML homepage doesn't seem to include the fix. Will this be updated soon?

Thanks in advance!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML_Main in C?
« Reply #1 on: March 09, 2009, 07:51:26 am »
Quote
One of the window tutorials recommends linking to sfml-main.lib to have a WinMain() provided for you - however this lib doesn't seem to be included in the C SDK

Hey that's right, I didn't ever notice :)

Quote
he download from the SFML homepage doesn't seem to include the fix. Will this be updated soon?

You have to wait for SFML 1.5, or get the latest sources from SVN and recompile yourself (which is not as difficult as it sounds).
Laurent Gomila - SFML developer

KLF

  • Newbie
  • *
  • Posts: 2
    • View Profile
SFML_Main in C?
« Reply #2 on: March 09, 2009, 01:42:26 pm »
Quote

You have to wait for SFML 1.5, or get the latest sources from SVN and recompile yourself (which is not as difficult as it sounds).


OK, I'll give it a try. Thanks for the quick reply!

 

anything