SFML community forums

Bindings - other languages => C => Topic started by: KLF on March 09, 2009, 06:50:21 am

Title: SFML_Main in C?
Post by: KLF 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!
Title: SFML_Main in C?
Post by: Laurent 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).
Title: SFML_Main in C?
Post by: KLF 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!