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

Author Topic: Linking issue with SFML 2.6.1  (Read 1445 times)

0 Members and 1 Guest are viewing this topic.

ulix

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Linking issue with SFML 2.6.1
« on: February 16, 2024, 02:29:21 pm »
Hello everyone
I'm facing a problem whilst trying to link my simple program against the pthread library
The command issue is the following:

/usr/bin/g++-10 -fdiagnostics-color=always -g /home/ulix/playground/game-programming/circle/circle.cpp -o /home/ulix/playground/game-programming/circle/circle -L/usr/local/lib -L/usr/lib -L/usr/lib/x86_64-linux-gnu -lsfml-graphics -lsfml-window -lsfml-system -lpthread

The error message is the following:

/usr/bin/ld: /usr/local/lib/libsfml-window.so: undefined reference to `dlclose@GLIBC_2.34'
/usr/bin/ld: /usr/local/lib/libsfml-system.so: undefined reference to `pthread_mutexattr_init@GLIBC_2.34'
/usr/bin/ld: /usr/local/lib/libsfml-system.so: undefined reference to `pthread_key_create@GLIBC_2.34'
/usr/bin/ld: /usr/local/lib/libsfml-system.so: undefined reference to `pthread_setspecific@GLIBC_2.34'
/usr/bin/ld: /usr/local/lib/libsfml-system.so: undefined reference to `pthread_cancel@GLIBC_2.34'
/usr/bin/ld: /usr/local/lib/libsfml-system.so: undefined reference to `pthread_join@GLIBC_2.34'
/usr/bin/ld: /usr/local/lib/libsfml-window.so: undefined reference to `dlsym@GLIBC_2.34'
/usr/bin/ld: /usr/local/lib/libsfml-system.so: undefined reference to `pthread_getspecific@GLIBC_2.34'
/usr/bin/ld: /usr/local/lib/libsfml-graphics.so: undefined reference to
`std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'
/usr/bin/ld: /usr/local/lib/libsfml-system.so: undefined reference to `pthread_key_delete@GLIBC_2.34'
/usr/bin/ld: /usr/local/lib/libsfml-window.so: undefined reference to `dlopen@GLIBC_2.34'
/usr/bin/ld: /usr/local/lib/libsfml-system.so: undefined reference to `pthread_mutexattr_settype@GLIBC_2.34'
/usr/bin/ld: /usr/local/lib/libsfml-system.so: undefined reference to `pthread_create@GLIBC_2.34'


I installed FSML version 2.6.1 and  libc version 2.31-13+deb11u5 on an Ubuntu distro
Do I shall install a previous version of FSML or alternatively where can I find which libc version a given version of SFML supports?

Thank you

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Linking issue with SFML 2.6.1
« Reply #1 on: February 16, 2024, 04:33:36 pm »
How did you install SFML? Did you build it from source?

What's FSML? ;D ;D
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

ulix

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Linking issue with SFML 2.6.1
« Reply #2 on: February 16, 2024, 05:15:01 pm »
FSML is a typo for SFML ...

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Linking issue with SFML 2.6.1
« Reply #3 on: February 21, 2024, 11:46:33 pm »
I know, that was just a funny remark ;)

What about the other question?
« Last Edit: February 23, 2024, 08:17:03 am by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

ulix

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Linking issue with SFML 2.6.1
« Reply #4 on: March 06, 2024, 09:59:30 am »
I solved the problem
I removed the package downloaded from SFML site and I installed the package with the package manager of my Linux distro