Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > BOOST again: how to proceed from here....

Reply
Thread Tools

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

 
 
Osiris
Guest
Posts: n/a
 
      01-01-2007
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:ython;

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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Best way to proceed Jeff User ASP .Net 2 12-07-2005 12:43 PM
Can't Proceed after log-in,some pages not opening Thaqalain Computer Support 2 07-16-2005 03:26 PM
"The printer has not yet responded, but the MS Office program may be able to proceed without printer information." Jimmy Clay Computer Support 1 11-11-2004 04:40 AM
please guide me how to proceed for MCSD naimish MCSD 7 12-24-2003 06:37 PM



Advertisments