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

Author Topic: Compiling program on Linux  (Read 2497 times)

0 Members and 1 Guest are viewing this topic.

thatoneguy

  • Newbie
  • *
  • Posts: 25
    • View Profile
Compiling program on Linux
« on: August 09, 2013, 09:38:33 am »
I'm following the SFML 2.0 tutorial for testing a program on Linux, but I'm getting the following error. I downloaded the precompiled SFML 2.1 32bit for Linux.

command:
g++ test.o -o test -L/home/crumb/sfml2.1-dev/lib -lsfml-network
 

result:
/usr/bin/ld:/home/crumb/sfml2.1-dev/lib/libsfml-network.so: file format not recognized; treating as linker script
/usr/bin/ld:/home/crumb/sfml2.1-dev/lib/libsfml-network.so:1: syntax error
collect2: ld returned 1 exit status
 

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Compiling program on Linux
« Reply #1 on: August 09, 2013, 11:27:34 am »
Show us the output of these commands:
Code: [Select]
uname -a
cat /proc/version
gcc -v
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

thatoneguy

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Compiling program on Linux
« Reply #2 on: August 09, 2013, 08:58:26 pm »
uname -a
Linux mcn 3.6.11+ #474 PREEMPT Thu Jun 13 17:14:42 BST 2013 armv6l GNU/Linux
 

cat /proc/version
Linux version 3.6.11+ (dc4@dc4-arm-01) (gcc version 4.7.2 20120731 (prerelease) (crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08) ) #474 PREEMPT Thu Jun 13 17:14:42 BST 2013
 

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14+rpi1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --wiht-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-14+rpi1)
 

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Compiling program on Linux
« Reply #3 on: August 09, 2013, 09:40:34 pm »
You are running an ARM system (not many of those around here ::)). You need to build SFML yourself. There are no precompiled libraries for ARM.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

thatoneguy

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Compiling program on Linux
« Reply #4 on: August 10, 2013, 07:50:06 am »
Ah, okay. I couldn't compile it correctly the first time, so I turned to the precompiled verion. Haha, only have an ARM chip cause I just got a Raspberry Pi. I'm only using SFML for the network module, since OpenGL isn't support :(

Thank you so much :D I got it to work.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Compiling program on Linux
« Reply #5 on: August 10, 2013, 07:56:59 am »
OpenGL ES is supported on the Raspberry Pi. However SFML doesn't have OpenGL ES support yet.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).