473,725 Members | 2,243 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\ja m_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\ja m_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\to ols\build\jam_s rc\bin.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_D YNAMIC_LIB
-DBOOST_PYTHON_S OURCE /Ogity /O2 /Gs /Ob2 /GX /GR /MD
-I"bin\boost\lib s\python\build" -I"W:\boost_1_31 _0"
-I"F:\Python23\i nclude" -I"F:\Program Files\Microsoft Visual
Studio\VC98\Inc lude"
-Fo"bin\boost\li bs\python\build \boost_python.d ll\msvc\release \inheritance.ob j"
-Tp"W:\boost_1_3 1_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_D YNAMIC_LIB
-DBOOST_PYTHON_S OURCE /Ogity /O2 /Gs /Ob2 /GX /GR /MD
-I"bin\boost\lib s\python\build" -I"W:\boost_1_31 _0"
-I"F:\Python23\i nclude"
-I"F:\Program Files\Microsoft Visual Studio\VC98\Inc lude"
-Fo"bin\boost\li bs\python\build \boost_python.d ll\msvc\release \inheritance.ob j"
-Tp"W:\boost_1_3 1_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_wi th_property<Con fig>::remove_ed ge'
: 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_wi th_property<Con fig>::remove_ed ge'
: 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_g raph_helper_wit h_property<Conf ig>::remove_edg e(typename
Config::edge_de scriptor e)
{
typedef typename Config::graph_t ype graph_type;
graph_type& g = static_cast<gra ph_type&>(*this );
boost::remove_e dge(source(e, g), target(e, g), *this);
}
// O(E/V) or O(log(E/V))
template <class EdgeOrIter, class Config>
inline void
remove_edge(Edg eOrIter e,
bidirectional_g raph_helper_wit h_property<Conf ig>& 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\to ols\build\jam_s rc\bin.ntx86
rem APPEND THE BJAM PATH ABOVE TO THE SYSTEM ENVRONMENT VARIABLE PATH
cd W:\boost_1_31_0 \libs\python\ex ample\tutorial
bjam -sTOOLS=msvc
The results are as follows

W:\boost_1_31_0 \libs\python\ex ample\tutorial> bjam -sTOOLS=msvc
....found 1978 targets...
....updating 7 targets...
vc-C++
...\..\..\..\bi n\boost\libs\py thon\build\boos t_python.dll\ms vc\debug\inheri tance.obj
inheritance.cpp
W:\boost_1_31_0 \boost/graph/detail/adjacency_list. hpp(1055) : error
C2244: 'bidirectional_ graph_helper_wi th_property<Con fig>::remove_ed ge'
: 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_D YNAMIC_LIB
-DBOOST_PYTHON_S OURCE /Z7 /Od /Ob0 /GX /GR /MDd
-I"..\..\..\..\b in\boost\libs\p ython\build" -I"W:\boost_1_31 _0"
-I"F:\Python23\i nclude" -I"F:\PROGRA~1\M ICROS~3\VC98\in clude"
-Fo"..\..\..\. .
\bin\boost\libs \python\build\b oost_python.dll \msvc\debug\inh eritance.obj"
-Tp"W:\boost_1_3 1_0\libs\python \build\../src/object/inheritance.cpp "

....failed vc-C++
...\..\..\..\bi n\boost\libs\py thon\build\boos t_python.dll\ms vc\debug\inheri tance.obj...
....skipped
<@boost!libs!py thon!build\boos t_python.dll\ms vc\debug>boost_ python.CMD
for lack of
<@boost!libs!py thon!build\boos t_python.dll\ms vc\debug>inheri tance.obj...
....skipped
<@boost!libs!py thon!build\boos t_python.dll\ms vc\debug>boost_ python.dll
for lack of
<@boost!libs!py thon!build\boos t_python.dll\ms vc\debug>boost_ python.CMD...
....skipped
<@boost!libs!py thon!build\boos t_python.dll\ms vc\debug>boost_ python.lib
for lack of
<@boost!libs!py thon!build\boos t_python.dll\ms vc\debug>boost_ python.CMD...
....skipped
<@boost!libs!py thon!example!tu torial\hello.py d\msvc\debug>he llo.CMD for
lack of
<@boost!libs!py thon!build\boos t_python.dll\ms vc\debug>boost_ python.lib...
....skipped
<@boost!libs!py thon!example!tu torial\hello.py d\msvc\debug>he llo.pyd for
lack of
<@boost!libs!py thon!build\boos t_python.dll\ms vc\debug>boost_ python.dll...
....skipped
<@boost!libs!py thon!example!tu torial\hello.py d\msvc\debug>he llo.lib for
lack of
<@boost!libs!py thon!build\boos t_python.dll\ms vc\debug>boost_ python.dll...
....failed updating 1 target...
....skipped 6 targets...

W:\boost_1_31_0 \libs\python\ex ample\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 4378
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
2214
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 numpy_info: FOUND: define_macros = include_dirs =
3
1749
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. See below for a detail description. Preparing resources...
6
3471
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 understand what this means. Can somebody tell me what is causing this? Do I have made some setup in a wrong way for some of my project where I build my library.
4
1575
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 not null PRIMARY KEY, credit_card_code varchar(30) not null, description varchar(255) null ) Now I am building classes and i can do it in 2 ways: * Build a class "CreditCard".
5
3421
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 __FOO_ #include "boost/filesystem.hpp"
6
2546
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 boost::lexical_cast to cast a vector of strings to a string. The compiler I'm using is MSVC++ 2005 Express Edition. The gc++
3
1428
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
10817
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, commercially sold application with only partial build instructions. The previous maintainer of the code (a mixture of C and C++) is no longer with the company, but when he built the code he used MSVC++, and though I am not certain of the version he was ...
0
8889
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9179
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9116
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8099
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.