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

Author Topic: Compile SFML for 32 bits  (Read 9714 times)

0 Members and 1 Guest are viewing this topic.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Compile SFML for 32 bits
« on: October 07, 2011, 05:02:28 pm »
I try to compile SFML 2 for 32 Bits on a 64 Bit Ubuntu. I have added the flag -m32 to CMAKE_CXX_FLAGS.

When I tried to build SFML, I first got errors concerning an incompatible standard library, which could be fixed through a symbolic link:
Code: [Select]
sudo ln -s /usr/lib32/libstdc++.so.6 /usr/lib32/libstdc++.so
Now a similar problem occured with the GLEW library:
Quote
Linking CXX shared library ../../../lib/libsfml-graphics.so
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libGLEW.so when searching for -lGLEW
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libGLEW.a when searching for -lGLEW
/usr/bin/ld: skipping incompatible //usr/lib/libGLEW.so when searching for -lGLEW
/usr/bin/ld: skipping incompatible //usr/lib/libGLEW.a when searching for -lGLEW
/usr/bin/ld: cannot find -lGLEW
collect2: ld returned 1 exit status

I guess I need a 32 bit version, or make the path known. But I don't know how to. I currently have the packages libglew1.5 and libglew1.5-dev installed.

Do you know more about this issue and possible solutions?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Compile SFML for 32 bits
« Reply #1 on: October 07, 2011, 06:14:31 pm »
You need to have the whole chain (mostly libraries, maybe some tools) in 32 bits version.

An alternative solution is to use a virtual machine with a 32 bits Linux on it.
Laurent Gomila - SFML developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Compile SFML for 32 bits
« Reply #2 on: October 07, 2011, 06:25:00 pm »
Okay, thank you. I still wonder whether my GLEW library is compiled for 64 bit and if so, how I can get a 32 bit version. I didn't see one in the packet manager, nor did I find any binaries for Ubuntu on the internet. But maybe I have just overlooked something.

And recompile every library manually... Hm, not the thing I currently feel like ;)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

gr3atmov3

  • Newbie
  • *
  • Posts: 3
    • View Profile
Compile SFML for 32 bits
« Reply #3 on: October 15, 2011, 10:36:25 pm »
Nexus, I have the same problem. I did exactly the same you did, i cant solve that problem.
I downloaded the 32 bit from SFML download page, but i cant manage to get eclipse working with those, instead of the onces for 64 downloaded from synaptic.

Have you solved it?

Thx,

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Compile SFML for 32 bits
« Reply #4 on: October 15, 2011, 10:49:56 pm »
Quote from: "gr3atmov3"
Have you solved it?
No, unfortunately not.

I have only found this thread, maybe we should ask OniLink10 how he compiled SFML for 32 bits.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Compile SFML for 32 bits
« Reply #5 on: October 15, 2011, 11:12:49 pm »
I'm running Arch Linux and have the multilib repos active. For all of the libs used by SFML, I just installed the lib32 variant.
I use the latest build of SFML2

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Compile SFML for 32 bits
« Reply #6 on: October 25, 2011, 05:52:02 pm »
After some searches on the internet, I have succeeded to compile SFML for 32 bits. I used the getlibs software, it makes the installation of 32 bit libraries really easy!
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
Compile SFML for 32 bits
« Reply #7 on: October 26, 2011, 03:24:25 am »

Silvah

  • Guest
Compile SFML for 32 bits
« Reply #8 on: October 26, 2011, 02:53:59 pm »
Quote from: "Svenstaro"
Why don't you just use this: https://aur.archlinux.org/packages.php?ID=49557 ?
I bet that's because AUR stands for Arch User Repository and he's using Ubuntu :P

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
Compile SFML for 32 bits
« Reply #9 on: October 26, 2011, 03:34:04 pm »
Ohh just saw that. Oh well.