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

Author Topic: Packet on Mac OS  (Read 1920 times)

0 Members and 1 Guest are viewing this topic.

Francis

  • Newbie
  • *
  • Posts: 1
    • View Profile
Packet on Mac OS
« on: July 26, 2013, 04:02:58 pm »
Hello, I really need help!  I'm not really good in programming.
I've been searching for one week! But I really couldn't find any answer.

I followed a tutorial that I found on internet and it works very well on my PC.

I tried to do the exact same thing on my Mac .... and  :o

I'm not gonna show you all my code!
the problem is when I try to insert/extract a STRING from a packet!

std::string text;
packet >> text;

When I try with a "int" or "char" it works perfectly!
On my PC, the string works, so the problem is not from code I guess...

Here's my wonderful error

ld: warning: directory not found for option '-L/usr/local/lib'
Undefined symbols for architecture x86_64:
  "sf::Packet::operator>>(std::string&)", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Help please!  ;D

 :'(

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Packet on Mac OS
« Reply #1 on: July 27, 2013, 11:12:17 am »
I tested a similar code. Works fine here. But I found what you did wrong:

You haven't configured your Xcode project accordingly to the SFML version you downloaded.

On the download page, you need to download the Clang version. Be careful to remove your current installation of SFML before installing the other version.
SFML / OS X developer

 

anything