473,418 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

build boost.python tutorial "hello world" without bjam

hi there,

for some days i try to build the boost.python tutorial "hello world"
without bjam on winxp by using mingw.
so i wrote a *.bat-file like the following:

// --- snip
--------------------------------------------------------------------------------------
@echo off
SETLOCAL
SET DIR_MINGW=c:\development_compiler\mingw\
SET DIR_BOOST=c:\development_compiler\_boost\
SET DIR_PYTHN=c:\development_compiler\python25\
SET DIR_PRJCT=%~dp0
SET NME_PRJCT=hello
SET CC=c:\development_compiler\mingw\bin\g++.exe
SET INCL=-I%DIR_BOOST%include\boost-1_34_1 -I%DIR_PYTHN%include -I
%DIR_MINGW%include
SET LIBS=-L%DIR_BOOST%lib -L%DIR_PYTHN%libs -L%DIR_MINGW%lib
%CC% -O0 -shared %INCL% %LIBS% -lboost_python-mgw34-s-1_34_1 -
lpython25 %DIR_PRJCT%%NME_PRJCT%.cpp -o %NME_PRJCT%.pyd
ENDLOCAL
// --- snip
--------------------------------------------------------------------------------------

this works fine. but nevertheless it produces errors.

// --- snip
--------------------------------------------------------------------------------------
D:\Temp\boost_test>c:\development_compiler\mingw\b in\g++.exe -O0 -
shared -Ic:\de
velopment_compiler\_boost\include\boost-1_34_1 -Ic:
\development_compiler\python2
5\include -Ic:\development_compiler\mingw\include -Lc:
\development_compiler\_boo
st\lib -Lc:\development_compiler\python25\libs -Lc:
\development_compiler\mingw\l
ib -lboost_python-mgw34-mt-s-1_34_1 -lpython25 D:\Temp\boost_test
\hello.cpp -o h
ello.pyd
C:\DOKUME~1\DBlock\LOKALE~1\Temp/cciAbaaa.o:hello.cpp:(.text+0x11e):
undefined r
eference to `_imp___ZN5boost6python6detail11init_moduleEPKcPFv vE'
C:\DOKUME~1\DBlock\LOKALE~1\Temp/cciAbaaa.o:hello.cpp:(.text
$_ZN5boost6python3de
fIPFPKcvEEEvS3_T_[void boost::python::def<char const* (*)()>(char
const*, char c
onst* (*)())]+0x6e): undefined reference to
`_imp___ZN5boost6python6detail17scop
e_setattr_docEPKcRKNS0_3api6objectES3_'
C:\DOKUME~1\DBlock\LOKALE~1\Temp/cciAbaaa.o:hello.cpp:(.text
$_ZN5boost6python6de
tail17make_function_auxIPFPKcvENS0_21default_call_ policiesENS_3mpl7vector1IS4_EE
EENS0_3api6objectET_RKT0_RKT1_[boost::python::api::object
boost::python::detail:
:make_function_aux<char const* (*)(),
boost::python::default_call_policies, boos
t::mpl::vector1<char const*(char const* (*)(),
boost::python::default_call_po
licies const&, boost::mpl::vector1<char const*const&)]+0x73):
undefined refere
nce to
`_imp___ZN5boost6python7objects15function_objectER KNS1_11py_functionE'
C:\DOKUME~1\DBlock\LOKALE~1\Temp/cciAbaaa.o:hello.cpp:(.text
$_ZN5boost6python7ob
jects21py_function_impl_baseC2Ev[boost::python::objects::py_function_impl_base::
py_function_impl_base()]+0x7): undefined reference to
`_imp___ZTVN5boost6python7
objects21py_function_impl_baseE'
C:\DOKUME~1\DBlock\LOKALE~1\Temp/cciAbaaa.o:hello.cpp:(.rdata
$_ZTVN5boost6python
7objects23caller_py_function_implINS0_6detail6call erIPFPKcvENS0_21default_call_p
oliciesENS_3mpl7vector1IS6_EEEEEE[vtable for
boost::python::objects::caller_py_f
unction_impl<boost::python::detail::caller<char const* (*)(),
boost::python::def
ault_call_policies, boost::mpl::vector1<char const* >]+0x18):
undefined refer
ence to `boost::python::objects::py_function_impl_base::ma x_arity()
const'
C:\DOKUME~1\DBlock\LOKALE~1\Temp/cciAbaaa.o:hello.cpp:(.text
$_ZN5boost6python3ap
i6objectC2Ev[boost::python::api::object::object()]+0x7): undefined
reference to
`_imp___Py_NoneStruct'
C:\DOKUME~1\DBlock\LOKALE~1\Temp/cciAbaaa.o:hello.cpp:(.text
$_ZN5boost6python7ob
jects23caller_py_function_implINS0_6detail6callerI PFPKcvENS0_21default_call_poli
ciesENS_3mpl7vector1IS6_EEEEED1Ev[boost::python::objects::caller_py_function_imp
l<boost::python::detail::caller<char const* (*)(),
boost::python::default_call_p
olicies, boost::mpl::vector1<char const*
>::~caller_py_function_impl()]+0x16)
: undefined reference to
`_imp___ZN5boost6python7objects21py_function_impl_ baseD
2Ev'
C:\DOKUME~1\DBlock\LOKALE~1\Temp/cciAbaaa.o:hello.cpp:(.text
$_ZN5boost6python7ob
jects23caller_py_function_implINS0_6detail6callerI PFPKcvENS0_21default_call_poli
ciesENS_3mpl7vector1IS6_EEEEED0Ev[boost::python::objects::caller_py_function_imp
l<boost::python::detail::caller<char const* (*)(),
boost::python::default_call_p
olicies, boost::mpl::vector1<char const*
>::~caller_py_function_impl()]+0x16)
: undefined reference to
`_imp___ZN5boost6python7objects21py_function_impl_ baseD
2Ev'
C:\DOKUME~1\DBlock\LOKALE~1\Temp/cciAbaaa.o:hello.cpp:(.text
$_ZNK5boost6python15
to_python_valueIRKPKcEclES5_[boost::python::to_python_value<char
const* const&>:
:operator()(char const* const&) const]+0xf): undefined reference to
`_imp___ZN5b
oost6python9converter19do_return_to_pythonEPKc'
C:\DOKUME~1\DBlock\LOKALE~1\Temp/cciAbaaa.o:hello.cpp:(.text
$_ZNK5boost6python9t
ype_info4nameEv[boost::python::type_info::name() const]+0x15):
undefined referen
ce to `_imp___ZN5boost6python6detail12gcc_demangleEPKc'
collect2: ld returned 1 exit status
// --- snip
--------------------------------------------------------------------------------------

any ideas what's wrong? any ideas how to fix that?

many, many thnx
daniel
Dec 1 '07 #1
0 4588

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

Similar topics

2
by: AIM | last post by:
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...
2
by: ME | last post by:
I am trying to find a prewritten method for converting a string like this:"Hello World" to this "Hello\sWorld". I plan to use it to build a regular expression. Specifically I am looking for a...
21
by: Alf P. Steinbach | last post by:
Just because there seems to be a lack of post-standard _correct_ tutorials: <url: http://home.no.net/dubjai/win32cpptut/>. Disclaimer: written this evening so perhaps there are "bugs" in the...
42
by: Prashanth Badabagni | last post by:
Hi, Can any body tell me how to print "hello,world" with out using semicolon Thanks in advance .. Bye Prashanth Badabagni
0
by: BartlebyScrivener | last post by:
I started a long email to a friend about how to get up and running on Python, then I thought, why not make something I can post? It's NOT a tutorial. Just a specific, narrow, quick installation...
2
by: Bell, Kevin | last post by:
I'm trying to get an idea of how packages work and I've read about it in the Py Tutorial and Nutshell, but I'm still craving a concrete example that I can poke through. Does anyone have a really...
4
by: arnuld | last post by:
i am learning C and doing the exercise 1-1 of K&R2, where K&R ask to remove some parts of programme and experiment with error, so here i go: #include <stdio.h> int main () { printf('hello...
3
by: elangovan2u | last post by:
how to print a message as "hello" without giving any statements in main function in C.
0
by: Gerardo Herzig | last post by:
Hi all. Im having some "problems" with a small concurrent plpython function. Based on a small example about concurrent programming, there is some code which works fine under python: #!...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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...
0
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...

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.