Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Had working SFML, messed with compiler, now doesnt work.  (Read 4193 times)

0 Members and 1 Guest are viewing this topic.

Tooni

  • Newbie
  • *
  • Posts: 11
    • View Profile
Had working SFML, messed with compiler, now doesnt work.
« 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.

Arcade

  • Full Member
  • ***
  • Posts: 230
    • View Profile
Re: Had working SFML, messed with compiler, now doesnt work.
« Reply #1 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
AW: Had working SFML, messed with compiler, now doesnt work.
« Reply #2 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tooni

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Had working SFML, messed with compiler, now doesnt work.
« Reply #3 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
AW: Had working SFML, messed with compiler, now doesnt work.
« Reply #4 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 .
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tooni

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Had working SFML, messed with compiler, now doesnt work.
« Reply #5 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

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
AW: Had working SFML, messed with compiler, now doesnt work.
« Reply #6 on: June 24, 2016, 07:12:52 am »
Make a clean rebuild.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tooni

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Had working SFML, messed with compiler, now doesnt work.
« Reply #7 on: June 24, 2016, 07:44:48 pm »
what do you mean by a clean rebuild?

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Had working SFML, messed with compiler, now doesnt work.
« Reply #8 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.

Tooni

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Had working SFML, messed with compiler, now doesnt work.
« Reply #9 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.

Tooni

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Had working SFML, messed with compiler, now doesnt work.
« Reply #10 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?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
AW: Had working SFML, messed with compiler, now doesnt work.
« Reply #11 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tooni

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Had working SFML, messed with compiler, now doesnt work.
« Reply #12 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

Tooni

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Had working SFML, messed with compiler, now doesnt work.
« Reply #13 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?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
AW: Had working SFML, messed with compiler, now doesnt work.
« Reply #14 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/