calculates the sum of an array of
> pointers to ints.
>
> #include "dptest.h"
> //the header file is just
> //int sum(int**, int);
>
> int sum(int** dp, int len){
> int sum = 0;
> for (int i = 0; i < len; i++){
> sum += *(
s just
//int sum(int**, int);
int sum(int** dp, int len){
int sum = 0;
for (int i = 0; i < len; i++){
sum += *(dp[i]);
}
return sum;
}
swig -c++ -python, then setup.py build_ext --inplace gets it nicely
compiled and wrapped for python use. It a
Hi,
I have a C++-Class "compiled" with SWIG into a Python-Modul. It works
fine. But there's is a problem with the C++-Returntype vector.
If I call in my compiled Python-Module a certain method (from the C++-
Class) there is no vector as result - although the C++-Counterpart
returns a vector. The P
Thanks a lot, Tim and Diez, Merci Beaucoup!!
I strongly suspect the error was caused by the memory operation. I
made some modifications only on PolygonMesh definition. And now I have
no annoying warnings.
PolygonMesh *new_PolygonMesh()
{
PolygonMesh *p = new PolygonMesh;
// p = (PolygonMesh *)
RLC <[EMAIL PROTECTED]> wrote:
>
>I am new to python SWIG. Recently I wrote a small program trying to
>import collada files(using colladadom) into python so I could use
>python cgkit to render them. However, during the progressing, I got
>some problems. Every time I quit from Python, I get a segmen
RLC schrieb:
Hello
I am new to python SWIG. Recently I wrote a small program trying to
import collada files(using colladadom) into python so I could use
python cgkit to render them. However, during the progressing, I got
some problems. Every time I quit from Python, I get a segmentation
fault, a
[EMAIL PROTECTED] wrote:
> Dear All,
>
> I have some functions written in C++, which I try to approach from
> python using swig. In the C++ functions I use std::cout to print stuff
> to output. Everything works fine, but the only problem that I have is
> that when I start IDLE and use the functio
Dear All,
I have some functions written in C++, which I try to approach from
python using swig. In the C++ functions I use std::cout to print stuff
to output. Everything works fine, but the only problem that I have is
that when I start IDLE and use the functions what std::cout should
print to the
Hi,
The error is generated because you are asking for a u8*, but the buffer is
not a u8*, perhaps a char* or even a void*. If you change the method
signature to either char* or void*, it may work like you want it to ;)
Matthieu
2008/4/10, Bill Davy <[EMAIL PROTECTED]>:
>
> Is there a better plac
Is there a better place to post such questions?
Anyway, in the hope it is something simple, I would appreciate some help.
I am adding some C++ code to Python. From Python I want to be able to read
data from a target device, over USB. My software does all the hard work and
I have a class:
cla
'1.0',
ext_modules=[
Extension('example', ['example.c', 'example.i'])
])
//***
--
View this message in context:
http://www.nabble.com/SWIG---C-Extensions%2C-win32---MinGW%3A-u
Dear All,
I am new to Python and SWIG, and I tried to search the SWIG
mailinglist for my specific question, but I did not find it. And for a
simple one c++ file, I can handle it successfully.
Now I have a small project including several C files, file1.C file2.C
file3.C file2.h file3.h , file1.C i
Now it works, the problem was in the project configuration of the
example, that
put the directory in Addictional Dependencies while it must be in
Addictional Library Directories
bye
w
n 7 Ott, 18:35, whatazor <[EMAIL PROTECTED]> wrote:
> Hi all,
> I must wrap some c++ code in python with swig. I
Hi all,
I must wrap some c++ code in python with swig. I try the swig examples
for VC++ , but when I build the project
it gives me that error:
example fatal error LNK1181: cannot open input file 'C:\Programmi
\Python25\libs.obj'
Any idea?
thank you
w
--
http://mail.python.org/mailman/listinfo/
Hi,
This might be slightly off topic and but i am hoping someone here can
help.
I am trying to build a python wrapper for some C++ classes that access
oracle.
when i try loading the module i get the following errors
Python 2.4.2 (#1, Nov 9 2005, 09:37:25) [C] on hp-ux11
Type "help", "copyright",
why are you modifying your setup.py file? can't you just run:
swig -c++ -python exampleFile.i
?
have you seen http://www.swig.org/tutorial.html , does it describe
something like what you'd like to do?
n
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm new to using python and SWIG. I am running Mac OS X 10.4. I have
a C++ class which I want to access from python, however I am unable
to compile it as a shared module in Mac OS X.
I have tried using Distutils and have successfully created a C
extension module, however I am unable to
Hi alltogether,
I found a nice and useful article for extenting python with C++ using
SWIG. It describe from the scratch especially for Windows. Maybe this
can be included somewhere on www.python.org. Here is the link:
http://www.geocities.com/foetsch/python/extending_python.htm
Alexander
18 matches
Mail list logo