0
votes

I decided to try with SFML again but here is when a new update comes and you don't know what to do. I managed to find how to setup my SFML but here the error is when i start the program

sf::RenderWindow window(sf::VideoMode(width, height, 32), "Example");

and here is a photo of the error and the code error

I tried fixing it but still noting, i watched tutorials pictures of the code examples but noting happened again. i hope you can help me with this problem.

after compiling it i got this many errors

Severity Code Description Project File Line Column Suppression State Error (active) E1696 cannot open source file "vector" MoonSurvival c:\SFML-2.4.2\include\SFML\Window\VideoMode.hpp 32 1
Error C1083 Cannot open include file: 'ostream': No such file or directory MoonSurvival C:\SFML-2.4.2\include\SFML\System\Err.hpp 32 1
Error (active) E0018 expected a ')' MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 150 35
Error (active) E0020 identifier "Iterator" is undefined MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 479 5
Error (active) E0020 identifier "ConstIterator" is undefined MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 489 5
Error (active) E0020 identifier "Iterator" is undefined MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 503 5
Error (active) E0020 identifier "ConstIterator" is undefined MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 517 5
Error (active) E0065 expected a ';' MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 52 30
Error (active) E0065 expected a ';' MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 53 30
Error (active) E0065 expected a ';' MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 276 22
Error (active) E0065 expected a ';' MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 286 22
Error (active) E0065 expected a ';' MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 299 22
Error (active) E0065 expected a ';' MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 527 22
Error (active) E0077 this declaration has no storage class or type specifier MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 276 5
Error (active) E0077 this declaration has no storage class or type specifier MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 286 5
Error (active) E0077 this declaration has no storage class or type specifier MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 299 5
Error (active) E0077 this declaration has no storage class or type specifier MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 527 5
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\Glsl.inl 40 61
Error (active) E0135 namespace "std" has no member "string" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\Texture.hpp 127 34
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\Texture.hpp 159 48
Error (active) E0135 namespace "std" has no member "ostream" MoonSurvival c:\SFML-2.4.2\include\SFML\System\Err.hpp 41 22
Error (active) E0135 namespace "std" has no member "basic_string" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 52 18
Error (active) E0135 namespace "std" has no member "basic_string" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 53 18
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 58 23
Error (active) E0135 namespace "std" has no member "locale" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 78 38
Error (active) E0135 namespace "std" has no member "locale" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 78 60
Error (active) E0135 namespace "std" has no member "locale" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 106 47
Error (active) E0135 namespace "std" has no member "locale" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 106 69
Error (active) E0135 namespace "std" has no member "string" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 118 23
Error (active) E0135 namespace "std" has no member "locale" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 118 54
Error (active) E0135 namespace "std" has no member "locale" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 118 76
Error (active) E0135 namespace "std" has no member "wstring" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 134 23
Error (active) E0135 namespace "std" has no member "string" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 253 10
Error (active) E0135 namespace "std" has no member "locale" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 253 41
Error (active) E0135 namespace "std" has no member "locale" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 253 63
Error (active) E0135 namespace "std" has no member "wstring" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 266 10
Error (active) E0135 namespace "std" has no member "basic_string" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 276 10
Error (active) E0135 namespace "std" has no member "basic_string" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 286 10
Error (active) E0135 namespace "std" has no member "basic_string" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 299 10
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 332 29
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 345 30
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 365 10
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 387 21
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 387 43
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 399 22
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 413 10
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 413 46
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 427 23
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 427 45
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 456 27
Error (active) E0135 namespace "std" has no member "size_t" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 456 49
Error (active) E0135 namespace "std" has no member "basic_string" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 527 10
Error (active) E0260 explicit type is missing ('int' assumed) MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 52 13
Error (active) E0260 explicit type is missing ('int' assumed) MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 53 13
Error (active) E0260 explicit type is missing ('int' assumed) MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 150 18
Error (active) E0260 explicit type is missing ('int' assumed) MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 221 5
Error (active) E0260 explicit type is missing ('int' assumed) MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 236 5
Error (active) E0289 no instance of constructor "sf::RenderWindow::RenderWindow" matches the argument list MoonSurvival c:\Users\Kids\source\repos\MoonSurvival\MoonSurvival\Launcher.cpp 17 26
Error (active) E0297 expected an operator MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 221 14
Error (active) E0297 expected an operator MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 236 14
Error (active) E1696 cannot open source file "vector" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\ConvexShape.hpp 33 1
Error (active) E1696 cannot open source file "map" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\Font.hpp 37 1
Error (active) E1696 cannot open source file "string" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\Font.hpp 38 1
Error (active) E1696 cannot open source file "vector" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\Font.hpp 39 1
Error (active) E1696 cannot open source file "string" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\Image.hpp 34 1
Error (active) E1696 cannot open source file "vector" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\Image.hpp 35 1
Error (active) E1696 cannot open source file "algorithm" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\Rect.hpp 32 1
Error (active) E1696 cannot open source file "string" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\RenderWindow.hpp 35 1
Error (active) E1696 cannot open source file "map" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\Shader.hpp 37 1
Error (active) E1696 cannot open source file "string" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\Shader.hpp 38 1
Error (active) E1696 cannot open source file "string" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\Text.hpp 38 1
Error (active) E1696 cannot open source file "vector" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\Text.hpp 39 1
Error (active) E1696 cannot open source file "vector" MoonSurvival c:\SFML-2.4.2\include\SFML\Graphics\VertexArray.hpp 36 1
Error (active) E1696 cannot open source file "ostream" MoonSurvival c:\SFML-2.4.2\include\SFML\System\Err.hpp 32 1
Error (active) E1696 cannot open source file "cstdio" MoonSurvival c:\SFML-2.4.2\include\SFML\System\FileInputStream.hpp 35 1
Error (active) E1696 cannot open source file "string" MoonSurvival c:\SFML-2.4.2\include\SFML\System\FileInputStream.hpp 36 1
Error (active) E1696 cannot open source file "cstdlib" MoonSurvival c:\SFML-2.4.2\include\SFML\System\MemoryInputStream.hpp 34 1
Error (active) E1696 cannot open source file "iterator" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 33 1
Error (active) E1696 cannot open source file "locale" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 34 1
Error (active) E1696 cannot open source file "string" MoonSurvival c:\SFML-2.4.2\include\SFML\System\String.hpp 35 1
Error (active) E1696 cannot open source file "cstdlib" MoonSurvival c:\SFML-2.4.2\include\SFML\System\Thread.hpp 33 1
Error (active) E1696 cannot open source file "cstdlib" MoonSurvival c:\SFML-2.4.2\include\SFML\System\ThreadLocal.hpp 33 1
Error (active) E1696 cannot open source file "algorithm" MoonSurvival c:\SFML-2.4.2\include\SFML\System\Utf.hpp 32 1
Error (active) E1696 cannot open source file "locale" MoonSurvival c:\SFML-2.4.2\include\SFML\System\Utf.hpp 33 1
Error (active) E1696 cannot open source file "string" MoonSurvival c:\SFML-2.4.2\include\SFML\System\Utf.hpp 34 1
Error (active) E1696 cannot open source file "cstdlib" MoonSurvival c:\SFML-2.4.2\include\SFML\System\Utf.hpp 35 1

and its really big, but when i saw it i touch maybe its because my project is on release not debug? i will try but for now that's the error.

[FINAL GOOD EDIT] everything is just fine maybe i have deleted something in the properties window but i made new project and everything is just fine

1
Have you tried assigning "Example" to a std::string variable before passing it to the RenderWindow constructor? Also, can you specify the compiler and platform you are using? - sgarizvi
Still not fixed - xX randomryze Xx
Which compiler are you using? This line should compile fine out of the box. Also your screenshot doesn't show a runtime error, it's a compiler error. Did you try to actually compile it? If this is Visual Studio Code, for me it sometimes has issues interpreting the headers properly and you can ignore them. - Mario
Try that one from SFML webpage and check if it's working for you sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!"); - morsisko
Code is correct, all params passes. Are you sure that you updated library files correct? Feels like they are corrupted and you forgot to replace some of them. - Nikita Smirnov

1 Answers

0
votes

Try to remove depth in VideoMode

sf::VideoMode(size,size)