Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Boost::lexical_cast error when usin Qtcreator with MSVC2010 compiler, but no error when using VisualStudio for the same code
Forum Updated to NodeBB v4.3 + New Features

Boost::lexical_cast error when usin Qtcreator with MSVC2010 compiler, but no error when using VisualStudio for the same code

Scheduled Pinned Locked Moved 3rd Party Software
3 Posts 2 Posters 2.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Phileas Fogg
    wrote on last edited by
    #1

    Hi,
    I'm right now porting an console app i wrote using VS2010exp into Qt creator (widget based project).
    I use boost::lexical_cast extensively in the code. In Vs it compiles and runs fine. The same code in Qt results in an error (without indicating a special line of code):
    @
    *c:\Program\boost\boost_1_47\boost\lexical_cast.hpp:1116: error: C2535: 'bool boost::detail::lexical_stream_limited_src<CharT,Base,Traits>::operator >>(unsigned short &)' : member function already defined or declared
    with
    [
    CharT=char_type,
    Base=base,
    Traits=traits
    ]
    c:\Program\boost\boost_1_47\boost\lexical_cast.hpp:993: see declaration of 'boost::detail::lexical_stream_limited_src<CharT,Base,Traits>::operator >>'
    with
    [
    CharT=char_type,
    Base=base,
    Traits=traits
    ]
    c:\Program\boost\boost_1_47\boost\lexical_cast.hpp:1524: see reference to class template instantiation 'boost::detail::lexical_stream_limited_src<CharT,Base,Traits>' being compiled
    with
    [
    CharT=char_type,
    Base=base,
    Traits=traits
    ]
    c:\Program\boost\boost_1_47\boost\lexical_cast.hpp:1653: see reference to function template instantiation 'Target boost::detail::lexical_cast<Target,src,false,char_type>(const std::basic_string<_Elem,_Traits,_Ax> &,CharT ,size_t)' being compiled
    with
    [
    Target=float,
    _Elem=wchar_t,
    _Traits=std::char_traits<wchar_t>,
    _Ax=std::allocator<wchar_t>,
    CharT=char_type
    ]
    c:\Program\boost\boost_1_47\boost\lexical_cast.hpp:1641: while compiling class template member function 'float boost::detail::lexical_cast_do_cast<Target,Source>::lexical_cast_impl(const Source &)'
    with
    [
    Target=float,
    Source=src
    ]
    c:\Program\boost\boost_1_47\boost\lexical_cast.hpp:1813: see reference to class template instantiation 'boost::detail::lexical_cast_do_cast<Target,Source>' being compiled
    with
    [
    Target=float,
    Source=src
    ]
    c:\Program\boost\boost_1_47\boost\lexical_cast.hpp:1813: see reference to class template instantiation 'boost::detail::lexical_cast_do_cast<Target,Source>' being compiled
    with
    [
    Target=float,
    Source=src
    ]

    @
    I have no clue what could cause this. Has anyone a hint for me? Thanks

    [edit] code tags added, koahnig

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Which compiler are you using in Qt Creator? The microsoft or the mingw one?

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Phileas Fogg
        wrote on last edited by
        #3

        The Microsoft one...
        And it's Boost 1_47 I use.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved