Hi I was having some trouble with using csfml, my comman to build is:
g++.exe -Wall -g -Wall -Iinclude -IC:\CSFML-2.2\include -c C:\test\src\test.cpp -o obj\Debug\src\test.o
and then the error messages pop up:
C:\test\src\test.cpp:2:17: error: 'sf' is not a namespace-name
using namespace sf;
^
C:\test\src\test.cpp:2:19: error: expected namespace-name before ';' token
using namespace sf;
^
C:\test\src\test.cpp: In function 'int main()':
C:\test\src\test.cpp:6:5: error: 'sf' has not been declared
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
^
C:\test\src\test.cpp:7:5: error: 'sf' has not been declared
sf::CircleShape shape(100.f);
^
C:\test\src\test.cpp:8:5: error: 'shape' was not declared in this scope
shape.setFillColor(sf::Color::Green);
^
C:\test\src\test.cpp:8:24: error: 'sf' has not been declared
shape.setFillColor(sf::Color::Green);
^
C:\test\src\test.cpp:10:12: error: 'window' was not declared in this scope
while (window.isOpen())
^
C:\test\src\test.cpp:12:9: error: 'sf' has not been declared
sf::Event event;
^
C:\test\src\test.cpp:13:33: error: 'event' was not declared in this scope
while (window.pollEvent(event))
^
C:\test\src\test.cpp:15:31: error: 'sf' has not been declared
if (event.type == sf::Event::Closed)
any idea?