473,396 Members | 1,900 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,396 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 4585

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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...
0
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,...

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.