Basic C++ SFML Display Window Error -
I am a beginner C ++ programmer who is currently using SFML I use Eclipse CDT with Minzid GCC, and I am trying to make the original window using the source code I found. I put the code inside, and apparently it does not work. I tried to include libraries, linker paths, include paths, incorporating files and everything, but it does not work for me.
Code:
Include # & lt; Sfml \ graphics HP & gt; # Include & lt; Sfml \ window HP & gt; # Include & lt; Sfml \ System.hpp> Int main () {sf :: Render Window Window (SF :: Video MOD (640, 480), "SFML Application"); SF :: Circle shape shape; Shape.setRadius (40.f); Shape.setPosition (100.f, 100.f); Shape.setFillColor (SF :: Color :: Cyan); While (window.isOpen ()) {sf :: Event event; While (window.pollEvent (event)) {if (event.type == sf :: Event :: off) window.close (); } Window.clear (); Window.draw (size); window display(); }} My console is giving me errors such as "window" is not defined in this scope "," shape "is not defined in this area", "expected; 'Size' ", etc.
Do anyone know, and how can someone help me?
I suggest that you try to do something like this before:
< Code> #include & lt; SFML \ System.hpp> Anti Main () {Return 0;} Just to make sure that the path is set correctly.
Then you can try to set the library path, the link, use the system module library and some of it's class.
Then you can try to use other modules, make sure they link in the right order
Comments
Post a Comment