1
General / g++ Linking Error on 64bit Linux Box
« 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.
For some reason when I execute the linking command I get this error:
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?
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
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
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?