Opened 19 years ago

Closed 17 years ago

#250 closed Bugs (Fixed)

Compiling Boost with Python without Unicode

Reported by: codeazure Owned by: david_abrahams
Milestone: Component: python USE GITHUB
Version: None Severity:
Keywords: Cc:

Description

If compiling Boost 1.31.0 against Python 2.2.3 where
Python has been compiled to not include Unicode
support, Boost fails to compile.

The problem is caused by a function within
libs/python/source/converter/builtin_converters.cpp

The function encode_string_unaryfunc() needs to be
preceded by #ifndef BOOST_NO_STD_WSTRING, which is
currently below the function.

It is also necessary to add #define
BOOST_NO_STD_WSTRING to libs/config/user.hpp to compile
Boost without Unicode support.

I am using Python on an embedded system where Unicode
is not required and support for these libraries
requires considerable memory.

To build Python without Unicode support, do this:
./configure --disable-unicode

Change History (1)

comment:1 by david_abrahams, 17 years ago

Status: assignedclosed
Logged In: YES 
user_id=52572

Fixed in CVS; should go out with 1.33.1

Please try my fix, since I am not easily able to test on a
Python with unicode disabled.  Your fix is not quite
appropriate; we should be checking Py_USES_UNICODE.

Note: See TracTickets for help on using tickets.