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

Author Topic: Strange problem with VC++ 10 and SFML 1.6 :P  (Read 2885 times)

0 Members and 1 Guest are viewing this topic.

Brainfuck

  • Newbie
  • *
  • Posts: 4
    • View Profile
Strange problem with VC++ 10 and SFML 1.6 :P
« on: December 03, 2011, 04:49:35 pm »
Hi there ;)
I try to compile this code :
Code: [Select]

#include <SFML/Graphics.hpp>

int main()
{
sf::RenderWindow App(sf::VideoMode(640,480,32),"Title");

    sf::Image Img;
    Img.LoadFromFile("sprite.png");

    sf::Sprite Sprite(Img);

    Sprite.SetPosition(200.f, 100.f);

    while (App.IsOpened())
    {
        App.Clear();        

        App.Draw(Sprite);

        App.Display();
    }

    return EXIT_SUCCESS;
}

with VC++ 2010 and i got this strange errors :

Code: [Select]
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(30): error C2143: syntax error : missing ',' before '<'
1>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(325) : see reference to class template instantiation 'std::_Deque_const_iterator<_Ty,_Alloc,_SECURE_VALIDATION>' being compiled
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(30): error C2518: keyword 'typename' illegal in base class list; ignored
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(31): error C2518: keyword 'typename' illegal in base class list; ignored
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(31): error C2518: keyword 'typename' illegal in base class list; ignored
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(45): error C2146: syntax error : missing ';' before identifier '_Mydequebase'
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(45): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(45): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(125): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(125): error C2143: syntax error : missing ',' before '*'
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(379): warning C4346: 'std::_Deque_const_iterator<_Ty,_Alloc,_SECURE_VALIDATION>::_Mydequebase' : dependent name is not a type
1>          prefix with 'typename' to indicate a type
1>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(452) : see reference to class template instantiation 'std::_Deque_iterator<_Ty,_Alloc,_SECURE_VALIDATION>' being compiled
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(379): error C2061: syntax error : identifier '_Mydequebase'
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(473): error C2143: syntax error : missing ',' before '<'
1>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(489) : see reference to class template instantiation 'std::_Deque_map<_Ty,_Alloc>' being compiled
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(539): error C2065: '_SECURE_VALIDATION_DEFAULT' : undeclared identifier
1>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(1316) : see reference to class template instantiation 'std::deque<_Ty,_Alloc>' being compiled
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(540): error C2065: '_SECURE_VALIDATION_DEFAULT' : undeclared identifier
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(548): error C3203: '_Deque_iterator' : unspecialized class template can't be used as a template argument for template parameter '_RanIt', expected a real type
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(548): error C2955: 'std::_Deque_iterator' : use of class template requires template argument list
1>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(339) : see declaration of 'std::_Deque_iterator'
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(549): error C3203: '_Deque_const_iterator' : unspecialized class template can't be used as a template argument for template parameter '_RanIt', expected a real type
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(549): error C2955: 'std::_Deque_const_iterator' : use of class template requires template argument list
1>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(30) : see declaration of 'std::_Deque_const_iterator'
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(1320): error C2143: syntax error : missing ';' before '<'
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(1320): error C2059: syntax error : '<'
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(1320): error C2065: '_Ty' : undeclared identifier
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(1320): error C2065: '_Ax' : undeclared identifier
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(1321): error C2143: syntax error : missing ';' before '{'
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(1321): error C2447: '{' : missing function header (old-style formal list?)
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(473): error C2504: '_Container_base_aux_alloc_real' : base class undefined
1>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(496) : see reference to class template instantiation 'std::_Deque_map<_Ty,_Alloc>' being compiled
1>          with
1>          [
1>              _Ty=sf::Event,
1>              _Alloc=std::allocator<sf::Event>
1>          ]
1>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(514) : see reference to class template instantiation 'std::_Deque_val<_Ty,_Alloc>' being compiled
1>          with
1>          [
1>              _Ty=sf::Event,
1>              _Alloc=std::allocator<sf::Event>
1>          ]
1>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\queue(22) : see reference to class template instantiation 'std::deque<_Ty>' being compiled
1>          with
1>          [
1>              _Ty=sf::Event
1>          ]
1>          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\SFML/Window/Window.hpp(312) : see reference to class template instantiation 'std::queue<_Ty>' being compiled
1>          with
1>          [
1>              _Ty=sf::Event
1>          ]
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(473): error C2143: syntax error : missing ',' before '<'
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\deque(476): fatal error C1903: unable to recover from previous error(s); stopping compilation

Please help :) i dont know what im doing wrong.

feyleaf

  • Newbie
  • *
  • Posts: 1
    • View Profile
Strange problem with VC++ 10 and SFML 1.6 :P
« Reply #1 on: December 04, 2011, 10:09:44 pm »
I was having a similar problem.
SFML 1.6 needs to be recompiled from source in MSVC++ 2010 Express in order to work. I found a video a while back that is super helpful in guiding you through the process.


 

anything