473,396 Members | 1,915 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.

BOOST again: how to proceed from here....

I'm trying to work with Boost, trying to use my C-code from Python..
So now I have generated a C_test2.dll and a C_test2.lib with Visual
C++ 2005, from code like this:
===============
#include <stdlib.h>
#include <stdafx.h>

namespace { // Avoid cluttering the global namespace.

int my_int; /* a global integer: or outside namespace ? */
double calc ( double f)
{
my_int = (int) (f/2);
// printf( "Half of %f is %d\n", f, my_int );
return f/2;
}

}

#include <boost/python.hpp>

using namespace boost::python;

BOOST_PYTHON_MODULE( half )
{
def("calc", calc );
}
=====================

Now I want to use calc from Python.
I have my Python in c:\python24\ (IDLE system, version 2.4.4)
Where do I put the dll and lib ?

in c:\python24\libs and c:\python24\DLLs ?

and do I import like:
import C_test2.dll
?
because now I get this:

Traceback (most recent call last):
File "<pyshell#1>", line 1, in -toplevel-
import C_test2.dll
ImportError: DLL load failed: The specified module could not be found.
Jan 1 '07 #1
0 828

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

Similar topics

18
by: perseus | last post by:
It is really crazy! I need to use the Boost filesystem for the manipulation of directories, and I have no idea how to install this filesystem on my IBM-compatible machine. Does anyone up here know...
2
by: Derek | last post by:
Something puzzles me about Boost's shared_ptr implementation: template <typename T> class shared_ptr { public: T* operator->() const { return p; }
205
by: Jeremy Siek | last post by:
CALL FOR PAPERS/PARTICIPATION C++, Boost, and the Future of C++ Libraries Workshop at OOPSLA October 24-28, 2004 Vancouver, British Columbia, Canada http://tinyurl.com/4n5pf Submissions
4
by: DSmith1974 | last post by:
Are lookarounds supported in the boost regex lib? In my VS6 project using boost 1.32.0 I can declare a regex as.. <code_snippet> std::wstring wstrFilename = L"01_BAR08"; boost::wregex...
6
by: Alex Buell | last post by:
I think one of the program snippets in the Boost's Bind library is wrong. I've just been trying to find the error in this program as below, perhaps there's an typo in there somewhere but I can't...
0
by: Osiris | last post by:
My experiences with BOOST on Windows XP and Visual C++ 2005 I'm new to Python. I built software in more than ten other computer languages. I'm not sure if that is not a handicap, when reading...
85
by: g | last post by:
Hello, is there any library for C as Boost is for C++? thanks in advance,
1
by: Noah Roberts | last post by:
Trying to use boost::function in a C++/CLI program. Here is code: pragma once #include <boost/function.hpp> #include <boost/shared_ptr.hpp> #include <vector> using namespace System;
19
by: =?ISO-8859-1?Q?Nordl=F6w?= | last post by:
I am currently designing a synchronized queue used to communicate between threads. Is the code given below a good solution? Am I using mutex lock/unlock more than needed? Are there any resources...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.