472,962 Members | 2,482 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,962 software developers and data experts.

Error in msvc in building inheritance.obj to build hello.pyd

AIM
Error in msvc in building inheritance.obj to build hello.pyd

Hello,

I am trying to build the boost 1.31.0 sample extension hello.cpp.
I can not compile the file inheritance.cpp because the two
files containing some templates: adjacency_list.hpp and mem_fn.hpp can
not compile.

Does anyone have any solutions?
Instead of Visual C++ 6.0 should I use a different compiler?
Anyone have any success on any other compiler?

Did anyone manage to build a hello.pyd?

Thank you very much.
Here is my script below (with embedded results).

rem I have MSVC 6.0 Service Pack 5 on Windows 2000 Service Pack 3
default installs on F:
rem Python is located in F:\Python23
rem Boost is located in W:\boost_1_31_0
rem MSVC stlPort 4.6.2 installed, compiled and
rem VC studio include dirs and libraries dirs configured to use it.

rem build boost.jam (so I have a bjam.exe for all below)
W:
vcvars32.bat
cd W:\boost_1_31_0\tools\build\jam_src
rem below since I have multilple toolsets installed I will always be
specific.
..\build.bat msvc
rem result: 2 minutes later: NO WARN NO ERRORS
dir W:\boost_1_31_0\tools\build\jam_src\bin.ntx86\*
rem result: OK I have *jam*.exe executables: bjam.exe jam.exe
mkjambase.exe yyacc.exe
rem build boost (using boost.jam (bjam from above))
W:
vcvars32.bat
set PYTHON_ROOT=F:\Python23
set PYTHON_VERSION=2.3
set PATH=%PATH%;W:\boost_1_31_0\tools\build\jam_src\bi n.ntx86
rem APPEND THE BJAM PATH ABOVE TO THE SYSTEM ENVRONMENT VARIABLE PATH
cd W:\boost_1_31_0
rem below since I have multilple toolsets installed I will always be
specific.
bjam "-sTOOLS=msvc" install
rem about 90 minutes later ERROR RESULTS FOLLOW:
<<< errors.txt contents below >>>

cl /Zm800 -nologo -GX -c -DNDEBUG -DNDEBUG -DBOOST_PYTHON_DYNAMIC_LIB
-DBOOST_PYTHON_SOURCE /Ogity /O2 /Gs /Ob2 /GX /GR /MD
-I"bin\boost\libs\python\build" -I"W:\boost_1_31_0"
-I"F:\Python23\include" -I"F:\Program Files\Microsoft Visual
Studio\VC98\Include"
-Fo"bin\boost\libs\python\build\boost_python.dll\ms vc\release\inheritance.obj"
-Tp"W:\boost_1_31_0\libs\python\build\../src/object/inheritance.cpp"

rem error below results below ...

F:\Program Files\Microsoft Visual Studio\VC98\Bin>cl /Zm800 -nologo
-GX -c -DNDEBUG -DNDEBUG -DBOOST_PYTHON_DYNAMIC_LIB
-DBOOST_PYTHON_SOURCE /Ogity /O2 /Gs /Ob2 /GX /GR /MD
-I"bin\boost\libs\python\build" -I"W:\boost_1_31_0"
-I"F:\Python23\include"
-I"F:\Program Files\Microsoft Visual Studio\VC98\Include"
-Fo"bin\boost\libs\python\build\boost_python.dll\ms vc\release\inheritance.obj"
-Tp"W:\boost_1_31_0\libs\python\build\../src/object/inheritance.cpp"
inheritance.cpp
W:\boost_1_31_0\boost/graph/detail/adjacency_list.hpp(1055) : error
C2244: 'bidirectional_graph_helper_with_property<Config>: :remove_edge'
: unable to resolve function overload
W:\boost_1_31_0\boost/graph/detail/adjacency_list.hpp(1057) : error
C2954: template definitions cannot nest
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2039: 'dm' : is not a
member of '_mfi'
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2143: syntax error :
missing ';' before '<'
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2501: 'dm' : missing
storage-class or type specifiers
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2059: syntax error : ';'
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2059: syntax error : '<'
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2653: 'T' : is not a
class or namespace name
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2645: no qualified name
for pointer to member (found ':: *')
W:\boost_1_31_0\boost/mem_fn.hpp(320) : error C2143: syntax error :
missing ';' before '}'
W:\boost_1_31_0\boost/mem_fn.hpp(320) : fatal error C1506:
unrecoverable block scoping error

F:\Program Files\Microsoft Visual Studio\VC98\Bin>

W:\boost_1_31_0\boost/graph/detail/adjacency_list.hpp(1055) : error
C2244: 'bidirectional_graph_helper_with_property<Config>: :remove_edge'
: unable to resolve function overload
W:\boost_1_31_0\boost/graph/detail/adjacency_list.hpp(1057) : error
C2954: template definitions cannot nest
rem the problem area in adjacency_list.hpp is here ...

template <class Config>
inline void

bidirectional_graph_helper_with_property<Config>:: remove_edge(typename
Config::edge_descriptor e)
{
typedef typename Config::graph_type graph_type;
graph_type& g = static_cast<graph_type&>(*this);
boost::remove_edge(source(e, g), target(e, g), *this);
}
// O(E/V) or O(log(E/V))
template <class EdgeOrIter, class Config>
inline void
remove_edge(EdgeOrIter e,
bidirectional_graph_helper_with_property<Config>& g_)
{
g_.remove_edge(e);
}
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2039: 'dm' : is not a
member of '_mfi'
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2143: syntax error :
missing ';' before '<'
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2501: 'dm' : missing
storage-class or type specifiers
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2059: syntax error : ';'
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2059: syntax error : '<'
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2653: 'T' : is not a
class or namespace name
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2645: no qualified name
for pointer to member (found ':: *')
W:\boost_1_31_0\boost/mem_fn.hpp(320) : error C2143: syntax error :
missing ';' before '}'
W:\boost_1_31_0\boost/mem_fn.hpp(320) : fatal error C1506:
unrecoverable block scoping error
rem The problem area in mem_fn.hpp is here ...
creating a template class at the end of mem_fn.hpp
template<class R, class T> _mfi::dm<R, T> mem_fn(R T::*f)
{
return _mfi::dm<R, T>(f);
}

} // namespace boost

rem build hello world
W:
vcvars32.bat
set PYTHON_ROOT=F:\Python23
set PYTHON_VERSION=2.3
set PATH=%PATH%;W:\boost_1_31_0\tools\build\jam_src\bi n.ntx86
rem APPEND THE BJAM PATH ABOVE TO THE SYSTEM ENVRONMENT VARIABLE PATH
cd W:\boost_1_31_0\libs\python\example\tutorial
bjam -sTOOLS=msvc
The results are as follows

W:\boost_1_31_0\libs\python\example\tutorial>bjam -sTOOLS=msvc
....found 1978 targets...
....updating 7 targets...
vc-C++
...\..\..\..\bin\boost\libs\python\build\boost_pyt hon.dll\msvc\debug\inheritance.obj
inheritance.cpp
W:\boost_1_31_0\boost/graph/detail/adjacency_list.hpp(1055) : error
C2244: 'bidirectional_graph_helper_with_property<Config>: :remove_edge'
: unable to resolve function overload
W:\boost_1_31_0\boost/graph/detail/adjacency_list.hpp(1057) : error
C2954: template definitions cannot nest
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2039: 'dm' : is not a
member of '_mfi'
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2143: syntax error :
missing ';' before '<'
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2501: 'dm' : missing
storage-class or type specifiers
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2059: syntax error : ';'
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2059: syntax error : '<'
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2653: 'T' : is not a
class or namespace name
W:\boost_1_31_0\boost/mem_fn.hpp(315) : error C2645: no qualified name
for pointer to member (found ':: *')
W:\boost_1_31_0\boost/mem_fn.hpp(320) : error C2143: syntax error :
missing ';' before '}'
W:\boost_1_31_0\boost/mem_fn.hpp(320) : fatal error C1506:
unrecoverable block scoping error
"cl" /Zm800 -nologo -GX -c -DBOOST_PYTHON_DYNAMIC_LIB
-DBOOST_PYTHON_SOURCE /Z7 /Od /Ob0 /GX /GR /MDd
-I"..\..\..\..\bin\boost\libs\python\build" -I"W:\boost_1_31_0"
-I"F:\Python23\include" -I"F:\PROGRA~1\MICROS~3\VC98\include"
-Fo"..\..\..\..
\bin\boost\libs\python\build\boost_python.dll\msvc \debug\inheritance.obj"
-Tp"W:\boost_1_31_0\libs\python\build\../src/object/inheritance.cpp"

....failed vc-C++
...\..\..\..\bin\boost\libs\python\build\boost_pyt hon.dll\msvc\debug\inheritance.obj...
....skipped
<@boost!libs!python!build\boost_python.dll\msvc\de bug>boost_python.CMD
for lack of
<@boost!libs!python!build\boost_python.dll\msvc\de bug>inheritance.obj...
....skipped
<@boost!libs!python!build\boost_python.dll\msvc\de bug>boost_python.dll
for lack of
<@boost!libs!python!build\boost_python.dll\msvc\de bug>boost_python.CMD...
....skipped
<@boost!libs!python!build\boost_python.dll\msvc\de bug>boost_python.lib
for lack of
<@boost!libs!python!build\boost_python.dll\msvc\de bug>boost_python.CMD...
....skipped
<@boost!libs!python!example!tutorial\hello.pyd\msv c\debug>hello.CMD for
lack of
<@boost!libs!python!build\boost_python.dll\msvc\de bug>boost_python.lib...
....skipped
<@boost!libs!python!example!tutorial\hello.pyd\msv c\debug>hello.pyd for
lack of
<@boost!libs!python!build\boost_python.dll\msvc\de bug>boost_python.dll...
....skipped
<@boost!libs!python!example!tutorial\hello.pyd\msv c\debug>hello.lib for
lack of
<@boost!libs!python!build\boost_python.dll\msvc\de bug>boost_python.dll...
....failed updating 1 target...
....skipped 6 targets...

W:\boost_1_31_0\libs\python\example\tutorial>dir hello*.*
rem results: ALL hello.CMD hello.pyd hello.lib NOT FOUND
Any Ideas about a possible solution?

AIM

Jul 18 '05 #1
2 4288
I use msvc 6.0 too, but my boost.python version is 1.32.0 , and i
didn't get error to compile the hello.pyd with the msvc6 IDE, the
hello demo from boost.python is compile with jam.
would you try to use boost.python 1.32.0 if no compatible problem

Jul 18 '05 #2
AIM
Donne Leen,

Thanks, thats a very good solution. I am glad to hear that the later
solution works for you.

I will try to get the 1.32.0 source Monday. I will try to compile
again next week.

Andre Mikulec
AIM

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: M. Faust | last post by:
Hi, after having installed F2PY-2.43.239_1806 I get the following error when trying to run the hello.f example from the /docs directory: f2py.py --fcompiler=compaqv -c -m hello hello.f...
3
by: tony | last post by:
Hello!! I use VS 2003 and C# for all class library except MeltPracCommon.dll which is C++.NET The problem is that I get these warnings when building the exe file and use my class libraries....
6
by: tony | last post by:
Hello! I have several projects where each one build a library.(class library or window control library). Now I get some strange compile error when building the *.exe file and doesn't...
4
by: =?Utf-8?B?Uml6d2Fu?= | last post by:
In the system I am working on, there are 3 credit cards: Visa, MasterCard and AmericanExpress. On the database side I have one table: credit_card CREATE TABLE credit_card ( credit_card_id int...
5
by: GaryE | last post by:
Hello: I am having trouble linking a couple of files using the boost::filesystem. I am using MSVC 6.0. Here is an abbreviated version of my problem: foo.h: #ifndef __FOO_ #define...
6
by: hsmit.home | last post by:
Hello, I came across a strange error and it's really been bugging me. Maybe someone else has come across this and any insight would be appreciated. What I'm trying to accomplish is using...
3
by: black_13 | last post by:
How do i build python 2.5.1 from source using MSVC 2005? Are there instructions on doing this. thanks black_13
3
by: imaloner | last post by:
I am posting two threads because I have two different problems, but both have the same background information. Common Background Information: I am trying to rebuild code for a working,...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.