SFML community forums

Help => Window => Topic started by: Anand on February 28, 2016, 09:08:18 pm

Title: error:identifier 'window' is unidentified
Post by: Anand on February 28, 2016, 09:08:18 pm
i am getting the error: identifier 'window' unidentified ;each time i am building the sfml project in visual c++ 2010.
i have provided the snapshot. pls see it and help me out
Title: Re: error:identifier 'window' is unidentified
Post by: shadowmouse on February 28, 2016, 09:12:18 pm
You never actually created an object called Window, you just wrote sf::RenderWindow( instead of sf::RenderWindow Window(.
Title: Re: error:identifier 'window' is unidentified
Post by: Anand on February 28, 2016, 09:16:41 pm
now it is giving multiple errors
PS:-attachment
Title: Re: error:identifier 'window' is unidentified
Post by: shadowmouse on February 28, 2016, 10:29:35 pm
Function case for SFML is camelCase, not PascalCase, where have you got this code from, seeing as it isn't from the tutorials (http://www.sfml-dev.org/tutorials/2.3/start-vc.php )?
Title: Re: error:identifier 'window' is unidentified
Post by: Hapax on February 28, 2016, 10:38:20 pm
This example code looks like it might be from SFML 1.
Things changed from version 1 to version 2.

** Official SFML v2.3 tutorials ** (http://www.sfml-dev.org/tutorials/2.3/)

(http://www.sfml-dev.org/tutorials/2.3/start-vc.php)?
Correction: http://www.sfml-dev.org/tutorials/2.3/start-vc.php
(your link breaks because of the trailing characters)
Title: Re: error:identifier 'window' is unidentified
Post by: shadowmouse on February 28, 2016, 10:59:02 pm
Fixed in case anyone follows that link before looking at your reply.
Title: Re: error:identifier 'window' is unidentified
Post by: Anand on February 29, 2016, 07:34:57 am
so do i need to use sfml 2.3. but i hv visual c++ 10 and code blocks 10.05 only installed in my computer. are these both compatible with sfml2.3
Title: Re: error:identifier 'window' is unidentified
Post by: Hapax on February 29, 2016, 08:21:57 pm
i hv visual c++ 10 and code blocks 10.05 only installed in my computer. are these both compatible with sfml2.3
Yes (http://www.sfml-dev.org/download/sfml/2.3.2/)
As you can see, there is a download for Visual C++ 10.
I'm not sure which MinGW is applicable to Code::Blocks 10.