SFML community forums

Help => General => Topic started by: flashrocket on April 14, 2014, 06:19:56 pm

Title: SFML static linking error (Cross compile)
Post by: flashrocket 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.
Title: AW: SFML static linking error (Cross compile)
Post by: eXpl0it3r 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.
Title: Re: SFML static linking error (Cross compile)
Post by: flashrocket 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
Title: AW: SFML static linking error (Cross compile)
Post by: eXpl0it3r 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.