ImportError: dynamic module does not define init function(initmymodule)

Balaji balaji at email.arizona.edu
Thu Aug 12 01:11:46 CEST 2004


I have an c++ header file.

//some_class.h

#ifndef _SOME_CLASS_H_
#define _SOME_CLASS_H_

class SomeClass
{
public:
	int sqr(int a);
};
#endif //_SOME_CLASS_H_

and I have an definition file some_class.C

//some_class.C

#include "some_class.h"


int SomeClass::sqr(int a){
	return a*a;
}
And I have an interface file
%module mytest
%{
#include "some_class.h"
}
%include "some_class.h"

My question is when I try to import mytest in python it does import it
but I'm not able to access the SomeClass..

Can anyone help..

Balaji

 

When I try to conver this into python module by using SWIG I manage to
import



More information about the Python-list mailing list