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

Author Topic: SFML static linking error (Cross compile)  (Read 1488 times)

0 Members and 1 Guest are viewing this topic.

flashrocket

  • Newbie
  • *
  • Posts: 21
    • View Profile
SFML static linking error (Cross compile)
« on: April 14, 2014, 06:19:56 pm »
I have compiled several games natively in Ubuntu using sfml 2.1.
Today i tried to cross compile the tutorial program using code blocks.
Im using the mingw compiler.
Here are the steps i followed correct me if im wrong.
first i compiled and tried to link to linux libs
error
so i downloaded mingw windows version of SFML from downloadpage.
it compiled but it while running it said that i needed libgcc_s_sjlj-1.dll,sfml-graphics-2.dll,sfml-system-2.dll and more libraries.
so i thought linking statically would be the answer and here i am.
Im testing using wine.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10815
    • View Profile
    • development blog
    • Email
AW: SFML static linking error (Cross compile)
« Reply #1 on: April 14, 2014, 06:30:59 pm »
Usually I suggest to use a native compiler, since cross compilation often won't go through as easily as imagined.

From the error log it seems that you're linking against the dynamic (eithout suffix) and static (with -s suffix) libraries of SFML, this will obviously lead to conflicts.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

flashrocket

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: SFML static linking error (Cross compile)
« Reply #2 on: April 14, 2014, 06:39:02 pm »
It seems i was using the built in template.
now i created a new one as console application and I get this

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10815
    • View Profile
    • development blog
    • Email
AW: SFML static linking error (Cross compile)
« Reply #3 on: April 14, 2014, 06:55:20 pm »
Looks like a runtime library incompatibility, meaning you either have to find a pre-compiled version of SFML for your exacte compiler version or build SFML from source.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/