Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: error:identifier 'window' is unidentified  (Read 5879 times)

0 Members and 2 Guests are viewing this topic.

Anand

  • Newbie
  • *
  • Posts: 11
    • View Profile
error:identifier 'window' is unidentified
« 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

shadowmouse

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
Re: error:identifier 'window' is unidentified
« Reply #1 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(.

Anand

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: error:identifier 'window' is unidentified
« Reply #2 on: February 28, 2016, 09:16:41 pm »
now it is giving multiple errors
PS:-attachment

shadowmouse

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
Re: error:identifier 'window' is unidentified
« Reply #3 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 )?
« Last Edit: February 28, 2016, 10:58:44 pm by shadowmouse »

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: error:identifier 'window' is unidentified
« Reply #4 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/start-vc.php)?
Correction: http://www.sfml-dev.org/tutorials/2.3/start-vc.php
(your link breaks because of the trailing characters)
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

shadowmouse

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
Re: error:identifier 'window' is unidentified
« Reply #5 on: February 28, 2016, 10:59:02 pm »
Fixed in case anyone follows that link before looking at your reply.

Anand

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: error:identifier 'window' is unidentified
« Reply #6 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

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: error:identifier 'window' is unidentified
« Reply #7 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
As you can see, there is a download for Visual C++ 10.
I'm not sure which MinGW is applicable to Code::Blocks 10.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

 

anything