SFML community forums
Bindings - other languages => C => Topic started 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:
#include <string.h>
#include <SFML/Audio.h>
#include <SFML/Graphics.h>
#include <physfs.h>
When I try to compile:
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. ;)
-
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???
-
This is actually a bug in CSFML, which will be fixed soon.
-
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.
-
It's done, it should compile now ;)