So I am just getting started with SFML, and as soon as I set up SFML with code:blocks and try to create a simple window, I get errors, as if it doesn't know about SFML.
When I run This code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow Window;
Window.create(sf::VideoMode(800,600),"Element 71");
while (Window.isOpen())
{
sf::Event Event;
while(Window.pollEvent(Event))
{
if(Event.type == sf::Event::Closed)
Window.close();
}
}
}
|
I get all these errors.
obj\Debug\main.o||In function `main':|
C:\Users\Owner\Documents\C++\Color Clicker\main.cpp|5|undefined reference to `_imp___ZN2sf12RenderWindowC1Ev'|
C:\Users\Owner\Documents\C++\Color Clicker\main.cpp|6|undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'|
C:\Users\Owner\Documents\C++\Color Clicker\main.cpp|6|undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'|
C:\Users\Owner\Documents\C++\Color Clicker\main.cpp|6|undefined reference to `_imp___ZN2sf6Window6createENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'|
C:\Users\Owner\Documents\C++\Color Clicker\main.cpp|14|undefined reference to `_imp___ZN2sf6Window5closeEv'|
C:\Users\Owner\Documents\C++\Color Clicker\main.cpp|11|undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'|
C:\Users\Owner\Documents\C++\Color Clicker\main.cpp|8|undefined reference to `_imp___ZNK2sf6Window6isOpenEv'|
C:\Users\Owner\Documents\C++\Color Clicker\main.cpp|16|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
C:\Users\Owner\Documents\C++\Color Clicker\main.cpp|16|undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'|
||=== Build finished: 9 errors, 0 warnings (0 minutes, 1 seconds) ===|
Im guessing I screwed up on the set-up, dont really know where though....
I am using SFML 2.0 GCC
Ask for any other info