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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Windy

Pages: [1]
1
General / Re: Linking issues - MacOSX
« on: July 12, 2014, 03:10:57 pm »
Thank you so much. It worked perfectly. I can't believe the answer was that simple.

2
General / Re: Linking issues - MacOSX
« on: July 12, 2014, 01:59:30 pm »
Quote
#include <string>
#include <SFML/Window.hpp>

using namespace std;

/*
This is to start the main loop and to segment the game from
*/
int main(){
  string h = "My Window";
  sf::Window window(sf::VideoMode(800, 600), h);
  return 0;
}

Just realized that it might be helpful to show what I am doing. I broke it down to as small as I possibly could to test it.

3
General / Re: Linking issues - MacOSX
« on: July 12, 2014, 01:45:23 pm »
Quote
clang++ -o bin/main.o -c -stdlib=libc++ -stdlib=libc++ src/main.cpp
clang++ -o bin/Game bin/main.o -L/usr/lib -L/usr/local/lib -lsfml-network -lsfml-graphics -lsfml-window -lfreetype -lsndfile
Undefined symbols for architecture x86_64:
  "sf::String::String(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::locale const&)", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64

Yes I am. Scons defaults to it but I just added a line to make sure.

4
General / [SOLVED]Linking issues - MacOSX
« on: July 12, 2014, 01:09:31 pm »
Hi, I hate to join to ask for help but I can't work this one in particular out for myself.

Using SFML 2.1 (installed via Homebrew) on a MaxOSX 10.9. I'm using SCONS to compile through terminal using these settings:

Quote
env = Environment()
env.Append(CPPFLAGS='-stdlib=libc++')
env.Append(CCFLAGS='-stdlib=libc++')
env.Append(LIBS = ['sfml-network','sfml-graphics', 'sfml-window'])
env.Append(LIBPATH = ['/usr/lib', '/usr/local/lib'])
env.Program(target = 'Game', source = ['Main.cpp'])

But when I try to open a window with:   Window window(VideoMode(800, 600), "My window");

I get the error:

Quote
Undefined symbols for architecture x86_64:
  "sf::String::String(char const*, std::__1::locale const&)", referenced from:
      _main in Main.o

Now, I do not get this error everywhere. I have no issue using the Network component of SFML to use TCPSockets and Listeners to do stuff with Telnet and such. It's just this one particular component so far.

I've done everything I can think off, including reinstalling command line tools and trawling the internet. The reason I'm using '-stdlib=libc++' flags is because a previous thread here suggested it.

Pages: [1]
anything