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.


Topics - zys5945

Pages: [1]
1
C / partical system and shader effects
« on: March 17, 2015, 07:53:00 pm »
Back then when I used sfml I would simply add to the class sf::drawable if I'm doing partical system or shader effects, just wondering what is the equivalent in csfml since I don't observe the sf::drawable class?

2
C / sf has not been declared
« on: March 11, 2015, 09:18:30 pm »
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?

3
General / cant run SFML on Code::Blocks
« on: March 09, 2015, 07:52:42 pm »
Just followed the tutorial and tried to compile the example code but got error messages:

||=== Build: Debug in test (compiler: GNU GCC Compiler) ===|
obj\Debug\src\test.o||In function `main':|
C:\test\src\test.cpp|5|undefined reference to `sf::String::String(char const*, std::locale const&)'|
C:\test\src\test.cpp|5|undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'|
C:\test\src\test.cpp|5|undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'|
C:\test\src\test.cpp|6|undefined reference to `sf::CircleShape::CircleShape(float, unsigned int)'|
C:\test\src\test.cpp|7|undefined reference to `sf::Color::Green'|
C:\test\src\test.cpp|7|undefined reference to `sf::Shape::setFillColor(sf::Color const&)'|
C:\test\src\test.cpp|15|undefined reference to `sf::Window::close()'|
C:\test\src\test.cpp|12|undefined reference to `sf::Window::pollEvent(sf::Event&)'|
C:\test\src\test.cpp|18|undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'|
C:\test\src\test.cpp|18|undefined reference to `sf::RenderTarget::clear(sf::Color const&)'|
C:\test\src\test.cpp|19|undefined reference to `sf::RenderStates::Default'|
C:\test\src\test.cpp|19|undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'|
C:\test\src\test.cpp|20|undefined reference to `sf::Window::display()'|
C:\test\src\test.cpp|9|undefined reference to `sf::Window::isOpen() const'|
C:\test\src\test.cpp|23|undefined reference to `sf::RenderWindow::~RenderWindow()'|
C:\test\src\test.cpp|23|undefined reference to `sf::RenderWindow::~RenderWindow()'|
C:\test\src\test.cpp|23|undefined reference to `sf::RenderWindow::~RenderWindow()'|
obj\Debug\src\test.o||In function `ZN2sf11CircleShapeD1Ev':|
C:\SFML-2.2\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `vtable for sf::CircleShape'|
C:\SFML-2.2\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `vtable for sf::CircleShape'|
C:\SFML-2.2\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `sf::Shape::~Shape()'|
||=== Build failed: 20 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

seems like a linker problem but i did link sfml-graphics sfml-window and sfml-system, cant figure out what's wrong, any help?

Pages: [1]