[C++-sig] examples compile but give exception (win32; intel 8.1; dinkumware 3.08)

Jens B. Jorgensen jorgensen at getcollc.com
Tue Jun 14 15:42:02 CEST 2005


I have a problem that hopefully someone can give me some insight to. I recently got Boost 1.32.0 to compile for my environment. I'm using the Intel c++ compiler 8.1 and the dinkumware std library v3.08. Getting everything to compile ultimately required my own custom intel-win32-sxl-tools.jam which I based on the intel-win32-tools.jam. The main options I added to get that working are:

CFLAGS += -I\"<path to dinkumware stdlib>" ;
CFLAGS += /D_GLOBAL_USING=1 /DBOOST_DATE_TIME_NO_LOCALE /D_HAS_EXCEPTIONS=1 /DBOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT -DBOOST_NO_EXCEPTION_STD_NAMESPACE /DBOOST_NO_STD_ALLOCATOR -DBOOST_NO_STD_USE_FACET -DBOOST_HAS_TWO_ARG_USE_FACET ;

e.g. if I use bjam "-sTOOLS=intel-win32-sxl" -n I see:

    CALL "c:\Program Files\Intel\CPP\Compiler80\Ia32\bin\ICLVARS.BAT" > nul
    "c:\Program Files\Intel\CPP\Compiler80\Ia32\bin\icl"  /Zm800 -nologo /EHsc -c  -DBOOST_PYTHON_DYNAMIC_LIB  /Z7 /Od /Ob0 /EHsc /GR /MDd -I"C:\VendorAPIs\SXL\include" /D_GLOBAL_USING=1 /DBOOST_DATE_TIME_NO_LOCALE /D_HAS_EXCEPTIONS=1 /DBOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT -DBOOST_NO_EXCEPTION_STD_NAMESPACE /DBOOST_NO_STD_ALLOCATOR -DBOOST_NO_STD_USE_FACET -DBOOST_HAS_TWO_ARG_USE_FACET  /Qwn5 /Qwd985 -Qoption,c,--arg_dep_lookup /Zc:forScope /Qansi_alias /Qvc6 -DBOOST_NO_INTRINSIC_WCHAR_T /EHa  -I"bin\example"  -I"C:\Program Files\Microsoft Visual
 Studio\VC98\include"  -I"c:\boost_1_32_0" -I"c:\Python24\include"   -Fo"bin\example\getting_started2.pyd\intel-win32-sxl\debug\threading-multi\getting_started2.obj"  -Tp"c:\boost_1_32_0\libs\python\example\getting_started2.cpp"

I arrived at my custom .jam through time patiently spent looking at compiler error messages and the source. With the above everything builds! Huzzah. We're using the Intel compiler in an msvc6 "environment" at the moment so I've got /Qvc6. 

So, then I proceeded to the hello example that defines a module with a "greet" function. Works fine. Then I tried to get a little fancier and create an object. This builds but I get a runtime error. So, ultimately I try using bjam to build the example code included. Everything builds fine but when I try to using the resulting python module I get some interesting things:

Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import getting_started2
>>> h = getting_started2.hello()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
Boost.Python.ArgumentError: Python argument types in
    hello.__init__(hello)
did not match C++ signature:
    __init__(struct _object *, class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)

Any ideas? I've been pondering the lists but I'm stumped. It's clear that someout it isn't able to map the class but I have no idea why. The above module was compiled from the source included in the distribution, I made no changes to the source.

Thanks for any help or pointers,

Jens B. Jorgensen
Getco, LLC





More information about the Cplusplus-sig mailing list