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

Author Topic: g++ Linking Error on 64bit Linux Box  (Read 817 times)

0 Members and 1 Guest are viewing this topic.

Forceofaqua

  • Newbie
  • *
  • Posts: 14
    • View Profile
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.
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?


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
g++ Linking Error on 64bit Linux Box
« Reply #1 on: April 02, 2017, 07:39:26 pm »
It's recommended to get SFML either through your package manager or build SFML from source.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything