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

Author Topic: Installed new MingW - SFML acting flakey  (Read 1801 times)

0 Members and 1 Guest are viewing this topic.

jeremiawuzza

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
Installed new MingW - SFML acting flakey
« on: July 31, 2015, 02:28:44 pm »
Hello all

I've just installed TDM GCC 32 with gcc 5.1.0. Some of my SFML apps still work, but some are refusing to compile, with helpful comments like
D:\SFML-2.3\lib\libsfml-graphics-s-d.a(VertexArray.cpp.obj)||duplicate section `.rdata$_ZTVN2sf8DrawableE[__ZTVN2sf8DrawableE]' has different size
and the exact same message for Text Sprite and Shape.

and about 15 build messages like

artPuzzle_dev.cpp|157|undefined reference to `sf::Font::loadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' -

 these errors seem to relate to my use of #defines to save having to write tedious pathnames all the time, BUT when I directly inserted the pathname in the loadFromFile function for example it still doesn't work.

I am using code::blocks as my IDE on a 64 bit W7 machine. All other programs in C++ work fine.
I have checked all my libraries and settings in CB. But like I say, these apps were all working yesterday!

Any help would be much appreciated.

Jeremy

Arcade

  • Full Member
  • ***
  • Posts: 230
    • View Profile
Re: Installed new MingW - SFML acting flakey
« Reply #1 on: July 31, 2015, 05:23:57 pm »
Possible  things to check:
1. You recompiled your programs with the new compiler, but did you also update your SFML libraries? You need to recompile SFML with the new compiler too.
2. Do you have more than one version of SFML installed? If so, make sure you are using matching versions of the headers and libraries
3. I think mis-matched compiler flags could also cause your first problem sometimes. For example, are you using any optimization flags when compiling your programs? Are you mixing up the debug and release versions of the SFML libraries?

jeremiawuzza

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
Re: Installed new MingW - SFML acting flakey
« Reply #2 on: August 01, 2015, 08:45:29 am »
Thanks for those hints. I did indeed need to compile SFML from source. Not as difficult as I thought it was going to be - I used Cmake and there is a Cmake lists file in the root dir of the SFML download.

 

anything