SFML community forums

Help => General => Topic started by: Forceofaqua on April 02, 2017, 06:52:02 pm

Title: g++ Linking Error on 64bit Linux Box
Post by: Forceofaqua on April 02, 2017, 06:52:02 pm
I'm following the linux tutorial, and i've run into a "file not recognized" error with my project.

I'm using Linux GCC 64bit SFML-2.4.2 downloaded from https://www.sfml-dev.org/download/sfml/2.4.2/

I've built my project using the following commands.
g++ -c main.cpp -ISFML-2.4.2/include
g++ main.o -LSFML-2.4.2/lib -lsfml-graphics -lsfml-window -lsfml-system

For some reason when I execute the linking command I get this error:
SFML-2.4.2/lib/libsfml-graphics.so: file not recognized: File truncated
collect2: error: ld returned 1 exit status

If I remove the -lsfml-graphics flag I get the same error with the window module.

I've downloaded SFML three times, so it cant be due to corruption of the files.
Am I missing some completely obvious?

Title: g++ Linking Error on 64bit Linux Box
Post by: eXpl0it3r on April 02, 2017, 07:39:26 pm
It's recommended to get SFML either through your package manager or build SFML from source.