Results 1 to 3 of 3

Thread: Visual Studio 2002 ClanLib 0.9 Compile Error

  1. #1
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default Visual Studio 2002 ClanLib 0.9 Compile Error

    The latest ClanLib 0.9 in the SVN will not compile on Visual Studio 2002 (v7.0.9955)

    Code:
    opengl.cpp
    C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xmemory(87) : error C2535: 'std::allocator<_Ty>::pointer std::allocator<_Ty>::address(std::allocator<_Ty>::reference) const' : member function already defined or declared
            with
            [
                _Ty=const std::_Tree<std::_Tmap_traits<const CL_OpenGLGraphicContextProvider *const ,CL_GLFunctions *,std::less<const CL_OpenGLGraphicContextProvider *const >,std::allocator<std::pair<const CL_OpenGLGraphicContextProvider *const ,CL_GLFunctions *>>,false>>::key_type 
            ]
            C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xmemory(81) : see declaration of 'std::allocator<_Ty>::address'
            with
            [
                _Ty=const std::_Tree<std::_Tmap_traits<const CL_OpenGLGraphicContextProvider *const ,CL_GLFunctions *,std::less<const CL_OpenGLGraphicContextProvider *const >,std::allocator<std::pair<const CL_OpenGLGraphicContextProvider *const ,CL_GLFunctions *>>,false>>::key_type 
            ]
            C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xtree(122) : see reference to class template instantiation 'std::allocator<_Ty>' being compiled
            with
            [
                _Ty=const std::_Tree<std::_Tmap_traits<const CL_OpenGLGraphicContextProvider *const ,CL_GLFunctions *,std::less<const CL_OpenGLGraphicContextProvider *const >,std::allocator<std::pair<const CL_OpenGLGraphicContextProvider *const ,CL_GLFunctions *>>,false>>::key_type 
            ]
            C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\map(77) : see reference to class template instantiation 'std::_Tree<_Traits>' being compiled
            with
            [
                _Traits=std::_Tmap_traits<const CL_OpenGLGraphicContextProvider *const ,CL_GLFunctions *,std::less<const CL_OpenGLGraphicContextProvider *const >,std::allocator<std::pair<const CL_OpenGLGraphicContextProvider *const ,CL_GLFunctions *>>,false>
            ]
            GL\OPENGL.CPP(492) : see reference to class template instantiation 'std::map<_Kty,_Ty,_Pr,_Alloc>' being compiled
            with
            [
                _Kty=const CL_OpenGLGraphicContextProvider *const ,
                _Ty=CL_GLFunctions *,
                _Pr=std::less<const CL_OpenGLGraphicContextProvider *const >,
                _Alloc=std::allocator<std::pair<const CL_OpenGLGraphicContextProvider *const ,CL_GLFunctions *>>
            ]
    In GL/opengl.cpp, If i change the line:
    Code:
    typedef std::map<const CL_OpenGLGraphicContextProvider * const, CL_GLFunctions *> cl_function_map_type;
    And remove the second "const"
    To give:

    Code:
    typedef std::map<const CL_OpenGLGraphicContextProvider *, CL_GLFunctions *> cl_function_map_type;
    It compiles.

    Is this a bug with clanlib or the compiler?

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Talking

    I added the following patch:

    +
    +// A fix for a compiler bug with compiler version 13.00.9466
    +#if _MSC_VER > 1300
    typedef std::map<const CL_OpenGLGraphicContextProvider * const, CL_GLFunctions *> cl_function_map_type;
    +#else
    +typedef std::map<const CL_OpenGLGraphicContextProvider *, CL_GLFunctions *> cl_function_map_type;
    +#endif
    +

  3. #3
    Knight
    Join Date
    Feb 2009
    Location
    I looked through my window, there are no signs ... but, its definitely planet Earth.
    Posts
    88

    Default

    @%$mmbf ... I'm going to shoot myself

Similar Threads

  1. Compile Error In Ubuntu Linux
    By Kurisu in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 08-18-2008, 05:38 PM
  2. Visual Studio Express c++ 8 help ??
    By babyvegas in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 06-19-2008, 07:11 AM
  3. Replies: 0
    Last Post: 10-16-2007, 04:44 PM
  4. encountered compile error 0.9 svn 146
    By voudras in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 01-11-2007, 06:57 AM
  5. Anyone using Microsoft Visual Studio Express with Clanlib?
    By killarkai in forum Official ClanLib SDK Forums
    Replies: 9
    Last Post: 12-24-2006, 03:16 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •