Hello every one. Like the title says I am trying to get SFML 1.6 to work with Code::Blocks. I have followed the tutorials on the SFML website but when ever I try to run the sample program it provides I receive these errors in the build log.
1 2 3
C:\sfml1.6\SFML-1.6\lib/libsfml-system-s.a(Clock.o):Clock.cpp:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
C:\sfml1.6\SFML-1.6\lib/libsfml-system-s.a(Platform.o):Platform.cpp:(.text+0xca): undefined reference to `_Unwind_Resume'
C:\sfml1.6\SFML-1.6\lib/libsfml-system-s.a(Platform.o):Platform.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
If anyone can point me in the right direction as far as whats wrong that would be great. Also I have had a heck of a time getting SFML to link, this is the first time I have tried to use a library so I was wondering if it is usually difficult or is just a first time doing but it will get easier type of thing?
In compiler and debugger settings, under the "Select Compiler" drop down menu I do have "GNU GCC compiler" selected. I looked under the drop down menu and did not find one that has g++ in it. Do I have to download it it? Also under compiler flags I have "Have g++ follow the coming C++0x ISO C++ language standard [-std=c++0x]" selected. If that helps.
Can you tell us what exactly you did while setting up ?
Copy the sfml header folder into your g++'s header folder and when you try to make an sfml project go to compiler settings,under linking tab select the sfml .lib files
Well i downloaded SFML 1.6 and put it in a file on my C: drive. I then went to settings> Global compiler settings > search directories tab > under compiler I put the path to the SFML "include" folder. Under linker I put the path to the "lib" folder. In linker settings > link libraries i put the paths to libsfml-graphics.a, libsfml-window.a, libsfml-system.a in that order. In other linker options I also put -lsfml-graphics-s, -lsfml-window-s, -lsfml-system-s.
Also I repeated this in, project > build options. I also put "SFML_STATIC" under the #defines tab. Everything in the debugger link libraries has the "-d" tag at the end.
@ cire. I just downloaded the files straight from the SFML website. To be honest I am not sure how to recompile it. Also I did originally start with 2.0 but when I tried to run it I got over 50 errors, it seemed like it wasn't recognizing the library at all. When I tried 1.6 I only got a couple of errors so I figured I was closer to getting it to work. lol
The release candidate for 2.0 and the version of 1.6 which is available precompiled (which isn't supported any more) are both incompatible with up-to-date compilers (it would be nice if there was a prominent note where they can be downloaded.) There is a thread with unofficial builds on the SFML forums which you can use if you aren't up to compiling SFML for yourself yet.
I was able to solve the problem, Cire was right about the compiling. I was able to find a tutorial on youtube that showed me how to do it. It actually wasn't that hard once I got into it. Thank you every one for the help.