Hey everyone. So I followed the SFML Coder page exactly to get sfml 2.0 set up using gcc.
This page :
http://sfmlcoder.wordpress.com/2011/08/16/building-sfml-2-0-with-make-for-gcc/It seemed to be all correct. I then wrote this simple program:
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
int main()
{
sf::VideoMode VMode(800, 600, 32);
sf::RenderWindow Window(VMode, "SFML Window");
while (Window.IsOpened())
{
sf::Event Event;
while (Window.PollEvent(Event))
{
switch (Event.Type)
{
case sf::Event::Closed:
Window.Close();
break;
default:
break;
}
}
Window.Clear(sf::Color(0, 255, 255));
Window.Display();
}
return 0;
}
and all I get is this message, which basically is telling me that it doesnt see any of the sfml stuff:
joe@joe-Latitude-D620:~/Desktop$ gcc -c sfmlwindow.cpp
joe@joe-Latitude-D620:~/Desktop$ gcc -o sfmlwindow sfmlwindow.o
sfmlwindow.o: In function `main':
sfmlwindow.cpp:(.text+0x30): undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
sfmlwindow.cpp:(.text+0x76): undefined reference to `std::allocator<char>::allocator()'
sfmlwindow.cpp:(.text+0x98): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
sfmlwindow.cpp:(.text+0xe3): undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, sf::ContextSettings const&)'
sfmlwindow.cpp:(.text+0xf2): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
sfmlwindow.cpp:(.text+0x101): undefined reference to `std::allocator<char>::~allocator()'
sfmlwindow.cpp:(.text+0x11f): undefined reference to `sf::Window::Close()'
sfmlwindow.cpp:(.text+0x137): undefined reference to `sf::Window::PollEvent(sf::Event&)'
sfmlwindow.cpp:(.text+0x16a): undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'
sfmlwindow.cpp:(.text+0x184): undefined reference to `sf::RenderTarget::Clear(sf::Color const&)'
sfmlwindow.cpp:(.text+0x190): undefined reference to `sf::Window::Display()'
sfmlwindow.cpp:(.text+0x19c): undefined reference to `sf::Window::IsOpened() const'
sfmlwindow.cpp:(.text+0x1b1): undefined reference to `sf::RenderWindow::~RenderWindow()'
sfmlwindow.cpp:(.text+0x1c9): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
sfmlwindow.cpp:(.text+0x1d9): undefined reference to `sf::RenderWindow::~RenderWindow()'
sfmlwindow.cpp:(.text+0x1ec): undefined reference to `std::allocator<char>::~allocator()'
sfmlwindow.cpp:(.text+0x204): undefined reference to `sf::RenderWindow::~RenderWindow()'
sfmlwindow.o:(.eh_frame+0x4b): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
ANY IDEAS?