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.
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.
#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;
}
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
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'])
Undefined symbols for architecture x86_64:
"sf::String::String(char const*, std::__1::locale const&)", referenced from:
_main in Main.o