SFML community forums

Help => General => Topic started by: Tooni on June 21, 2016, 10:38:56 pm

Title: Had working SFML, messed with compiler, now doesnt work.
Post 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.
Title: Re: Had working SFML, messed with compiler, now doesnt work.
Post by: Arcade on June 21, 2016, 10:56:59 pm
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.
Title: AW: Had working SFML, messed with compiler, now doesnt work.
Post by: eXpl0it3r on June 21, 2016, 11:13:34 pm
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.
Title: Re: Had working SFML, messed with compiler, now doesnt work.
Post by: Tooni on June 22, 2016, 05:28:25 pm
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.
Title: AW: Had working SFML, messed with compiler, now doesnt work.
Post by: eXpl0it3r on June 22, 2016, 09:13:41 pm
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 .
Title: Re: Had working SFML, messed with compiler, now doesnt work.
Post by: Tooni on June 23, 2016, 08:28:13 pm
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
Title: AW: Had working SFML, messed with compiler, now doesnt work.
Post by: eXpl0it3r on June 24, 2016, 07:12:52 am
Make a clean rebuild.
Title: Re: Had working SFML, messed with compiler, now doesnt work.
Post by: Tooni on June 24, 2016, 07:44:48 pm
what do you mean by a clean rebuild?
Title: Re: Had working SFML, messed with compiler, now doesnt work.
Post by: Jesper Juhl on June 25, 2016, 02:54:23 am
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.
Title: Re: Had working SFML, messed with compiler, now doesnt work.
Post by: Tooni on June 25, 2016, 06:20:37 pm
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.
Title: Re: Had working SFML, messed with compiler, now doesnt work.
Post by: Tooni on June 27, 2016, 08:07:58 pm
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?
Title: AW: Had working SFML, messed with compiler, now doesnt work.
Post by: eXpl0it3r on June 28, 2016, 06:03:04 am
Do you link the tmxloader also as library? If so you need to build it with the same compiler as well.
Title: Re: Had working SFML, messed with compiler, now doesnt work.
Post by: Tooni on June 28, 2016, 11:06:15 am
it says just to add the source files to the project, and that's how i had it working before
Title: Re: Had working SFML, messed with compiler, now doesnt work.
Post by: Tooni on June 29, 2016, 04:49:34 pm
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?
Title: AW: Had working SFML, messed with compiler, now doesnt work.
Post by: eXpl0it3r on June 29, 2016, 05:16:56 pm
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.
Title: Re: Had working SFML, messed with compiler, now doesnt work.
Post by: Tooni on July 01, 2016, 05:54:58 pm
but i built my sfml libraries with 4.9.x and it works with them?
Title: Re: Had working SFML, messed with compiler, now doesnt work.
Post by: Tooni on July 04, 2016, 07:46:09 pm
i rebuilt the whole project and it started working lmao, thanks guys