SFML community forums

Bindings - other languages => C => Topic started by: deltaphc on January 27, 2009, 10:32:33 am

Title: Two issues I've come across
Post by: deltaphc on January 27, 2009, 10:32:33 am
Hello! Couldn't find these issues elsewhere, so I decided to register and post this.

At the top of my main.c:
Code: [Select]
#include <string.h>
#include <SFML/Audio.h>
#include <SFML/Graphics.h>
#include <physfs.h>


When I try to compile:
Code: [Select]
C:\dev\SFML-1.4\CSFML\include\SFML\Graphics\RenderWindow.h|51|error: redefinition of typedef 'sfRenderWindow'|
C:\dev\SFML-1.4\CSFML\include\SFML\Graphics\Image.h|36|error: previous declaration of 'sfRenderWindow' was here|
||=== Build finished: 2 errors, 0 warnings ===|


Using MinGW (GCC 4.3.2) and CodeBlocks. Any ideas?

Also, in the CSFML/lib/mingw/ folder in the C SDK, it appears that the filenames of the dynamic and static libraries are reversed. i.e. it's named libcsfml-audio.a when it should be audio-s, etc.

The regular C++ version works fine, but I just code in C as a personal preference. ;)
Title: Two issues I've come across
Post by: Sirt on January 29, 2009, 02:47:37 pm
I have the very same problem here too!

I wonder if it's how I've linked the lib files (the order),so I only linked the graphics lib and still get the redefinition errors.

Hey deltaphc,did you sort this one out,I'm stuck???
Title: Two issues I've come across
Post by: Laurent on January 29, 2009, 03:17:27 pm
This is actually a bug in CSFML, which will be fixed soon.
Title: Two issues I've come across
Post by: Sirt on January 29, 2009, 04:11:19 pm
Quote from: "Laurent"
This is actually a bug in CSFML, which will be fixed soon.


Thanks for your response Laurent,
I at least can rest at ease now.

Fantastic creation btw.
Title: Two issues I've come across
Post by: Laurent on January 30, 2009, 03:52:20 pm
It's done, it should compile now ;)