Opened 11 years ago

Last modified 10 years ago

#5877 new Bugs

Ambiguous call building Boost.Python quickstart example

Reported by: paul@… Owned by: Stefan Seefeld
Milestone: To Be Determined Component: python USE GITHUB
Version: Boost 1.47.0 Severity: Problem
Keywords: quickstart ambiguous Cc:

Description

If I use .\b2 to do a build of plain vanilla Boost 1.47 on 32-bit Windows 7 using Python 3.2 and MSVC 10.0 SP1, it completes without error. I then add the lib= and include= environment variables as instructed at the end of the build, and CD to the python quickstart example.

When I then use b2 to build the quickstart example, it fails with:

embedding.cpp
embedding.cpp(39) : error C2668: 'std::basic_string<_Elem,_Traits,_Ax>::basic_st
ring' : ambiguous call to overloaded function
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>,
            _Ax=std::allocator<char>
        ]
        c:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\xstring(700): c
ould be 'std::basic_string<_Elem,_Traits,_Ax>::basic_string(std::basic_string<_E
lem,_Traits,_Ax> &&)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>,
            _Ax=std::allocator<char>
        ]
        c:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\xstring(590): o
r       'std::basic_string<_Elem,_Traits,_Ax>::basic_string(const _Elem *)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>,
            _Ax=std::allocator<char>
        ]
        while trying to match the argument list '(boost::python::detail::method_
result)'

and

embedding.cpp(56) : error C2065: 'initembedded_hello' : undeclared identifier

Of course, the second error may be caused by the first.

See http://mail.python.org/pipermail/cplusplus-sig/2011-September/016147.html for a more complete history and console listing.

Change History (5)

comment:1 by anonymous, 11 years ago

Component: NonePython
Owner: set to Ralf W. Grosse-Kunstleve

in reply to:  1 comment:2 by anonymous, 11 years ago

Replying to anonymous: Sorry, I see this was assigned somehow to rwgk. Either I did this accidentally when changing the component (which is what it seems to be saying above); or someone / something else changed this because he is the right person to look at the ticket.

I'm afraid I can't tell which and I can't see how to set the owner back to "unassigned". :-(

comment:3 by Ralf W. Grosse-Kunstleve, 11 years ago

Owner: changed from Ralf W. Grosse-Kunstleve to Stefan Seefeld

Stefan, can you help with this?

comment:4 by anonymous, 10 years ago

Seconded; I get a similar error; win7, msvs10, 64bit.

'Tutorial' runs fine, but 'quickstart' gives the 'embedding.cpp(39) : error C2668' nonsense.

comment:5 by Stefan Seefeld, 10 years ago

I see the issue has been assigned to me. I'm unfortunately not sure I can help, as I'm not using Windows, and even less MSVC. However, I notice that just above the failing line is a conditional line of code to work around a MSVC bug, and it appears that could easily be extended to include the compiler version it now fails with.

Unfortunately, I don't know how to widen the conditional expression to include the still failing compilers, so I'd rather not touch that code. This should be pretty obvious to fix for anyone with the appropriate Windows compiler at hand.

Note: See TracTickets for help on using tickets.