SFML community forums
Help => General => Topic started by: Tooni on June 21, 2016, 10:38:56 pm
-
I was working with
SFML-2.3.2-windows-gcc-4.8.1-tdm-32-bit from here http://www.sfml-dev.org/download/sfml/2.3.2/
MinGW v4.8.1
Code::Blocks v13.12
this tmx parser https://github.com/fallahn/sfml-tmxloader
and http://zlib.net/
It worked great until earlier today when I tried to make a portable version of Codeblocks to put on my USB so I could use it at school. To do this I followed this guide http://forums.codeblocks.org/index.php/topic,4475.msg43203.html?PHPSESSID=s0olvc4bl2lskufc6f07c0t3p3#msg43203 But instead of using the mingw version it lists I copy-pasted my own mingw from c:/ onto my USB and set codeblocks to use that as the compiler. When I tried to use this version of codeblocks with my project it didnt work. At some point during this process I changed something that somehow wiped the 'build options' of my project.
So for my project I reinput the build options in hopefully the same way as before http://i.imgur.com/NpRtrxi.png http://i.imgur.com/k960r02.png http://i.imgur.com/hNgdusr.png and now upon compiling I get the errors you can see at the bottom of those prtscrs. I didnt change any code so I'm certain I've fucked something up with the compiler but have no idea what. I've been trying shit for like 2 hours now to fix this and don't know what to do.
-
Looks like the type of errors you get when you don't link against the C++ runtime library. I don't know anything about how to configure Code::Blocks, but if you just do a google search for your error "undefined reference to __gxx_personality_sj0" you should find plenty of information on it.
-
The SFML builds need to be built with the same compiler. If you switch from one to the other compiler you need different builds. So the easiest way to go about it, is to use the same compiler and a compatible SFML build.
-
this is how I have it set up now, still with the same error :(
http://i.imgur.com/WvVb4TD.png
thanks for the help so far.
-
The easiest solution is to use a compiler of your choice and build all the needed C++ libraries yourself with that compiler.
Otherwise your compiler must match the one that was used to build the SFML builds exactly .
-
I compiled sfml 2.3.2 libraries with cmake and cmd. It works with just sfml (i think this was the case before too but i did not test it) but will not work with the parser I was using at https://github.com/fallahn/sfml-tmxloader
http://i.imgur.com/Y7lYrTy.png?1
-
Make a clean rebuild.
-
what do you mean by a clean rebuild?
-
Build files should be under version control just like the source code. So I'll just assume that that is the case and provide this answer: look at a diff of your current and previous version of the build files (settings) and see what you changed, then change it back.
-
i didnt do that unfortunately
so far i've tried 4 different versions of mingw and compiled sfml libraries , and 2 versions of codeblocks, with the same errors every time.
-
my sfml libraries are working on their own but will not work with this library as they used to
https://github.com/fallahn/sfml-tmxloader
errors are still gxx_personality_v0 things, any ideas?
-
Do you link the tmxloader also as library? If so you need to build it with the same compiler as well.
-
it says just to add the source files to the project, and that's how i had it working before
-
seems like my compiler is doing something with mingw 4.7.1? http://i.imgur.com/WAtfzkY.png?1 i dont even have it installed. i have 4.9.2. Could this be the problem?
-
Your Code::Blocks install came with a MinGW compiler and uses that one for building things. Thus your libraries built with MinGW 4.9.x aren't compatible with the compiler you use with Code::Blocks.
-
but i built my sfml libraries with 4.9.x and it works with them?
-
i rebuilt the whole project and it started working lmao, thanks guys