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

Author Topic: Packet Errors  (Read 3216 times)

0 Members and 3 Guests are viewing this topic.

Vied71

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Packet Errors
« on: November 19, 2016, 03:50:25 am »
I'm learning Socket Programming and I've been Stuck on creating the packets. This isn't even my code it's from the SFML github wiki. My SFML library config is correct because I can make GUIs without error.While Compiling this code I get the errors:
undefined reference to 'sf::IPAddress::IpAddres(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&0'

undefined reference to 'sf::Packet::operator <<(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&0'

undefined reference to 'sf::Packet::operator>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&0'

jamesL

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: Packet Errors
« Reply #1 on: November 19, 2016, 08:56:50 am »
what compiler are you using ?

total guess here, but maybe you have to go to the project settings and check the box for C++11

Vied71

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Packet Errors
« Reply #2 on: November 19, 2016, 03:07:01 pm »
That Didn't Work. I still get the same errors

WithoutBrain

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • Email
Re: Packet Errors
« Reply #3 on: November 21, 2016, 06:34:13 pm »
Please screen of the errors.

Vied71

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Packet Errors
« Reply #4 on: November 21, 2016, 11:01:00 pm »
Here are the errors

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11016
    • View Profile
    • development blog
    • Email
Packet Errors
« Reply #5 on: November 22, 2016, 01:38:58 am »
My guess is that you don't use the exact same compiler as was used for building SFML. The easiest way to fix this is by rebuilding SFML with your compiler.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Vied71

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Packet Errors
« Reply #6 on: November 22, 2016, 01:49:37 am »
Ok, I've compiled SFML and put the new lib and dll files in my SFML directory. Now the program builds successfully. But, when I run the program I get this error.
The procedure entry point
_ZN2sf6PacketIsERKNST7_cxx1112basic_stringIcSt11char_traitsIcESalcEEE could not be located in the dynamic link library.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11016
    • View Profile
    • development blog
    • Email
Packet Errors
« Reply #7 on: November 22, 2016, 01:51:09 am »
It's still using the old DLL somewhere.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything