To make a static library and not make a shared library, use the
--disable-shared and --enable-static flags.
+ NOTE: It has been discovered that some pre-built distributions of
+ Python are built with options that can cause incompatibilities
+ between wxPython and wxGTK. Typically these are things like large
+ file support on the platforms that have it. This causes some basic
+ types, like off_t, to be typedef'd differently causing the C++
+ method signatures to be incompatible and giving link errors. The
+ way to fix this is to activate these same settings in the wxGTK
+ build, usually by looking at the flags and options used in
+ compiling wxPython that are different from the options used on
+ wxGTK compiles. For example, on SuSE doing the following before
+ running wxGTK's configure seems to take care of it:
+
+ export CFLAGS="-D_FILE_OFFSET_BITS=64 -DHAVE_LARGEFILE_SUPPORT"
+ export CXXFLAGS=$CFLAGS
+
+
E. Now just compile and install. You need to use GNU make, so if your
system has something else get GNU make and build and install it and
use it instead of your system's default make command.
it doesn't, there doesn't seem to be a way to override the values
that Distutils uses without hacking either Distutils itself, or
Python's Makefile. (Complain to the distutils-sig about this
- please.) For example, on my Solaris system I had to edit
+ please.) For example, on a Solaris system I had to edit
/usr/local/lib/python1.5/config/Makefile and replace
LDSHARED=ld -G
In my case on Solaris wxPython applications would core dump on
exit. The core file indicated that the fault happened after
- _exit() was called and the run-time was trying to execute cleanup
- code. After relinking the Python executable the problem went away.
- To build Python to link with the C++ linker do this:
+ _exit() was called and the run-time library was trying to execute
+ cleanup code. After relinking the Python executable the problem
+ went away. To build Python to link with the C++ linker do this:
cd Python-2.0 # wherever the root of the source tree is
rm python # in case it's still there from an old build
wxPyEndBlockThreads();
}
+#include <wx/metafile.h>
+
// See below in the init function...
wxClipboard* wxPyTheClipboard;
return _resultobj;
}
+static void *SwigwxMetafileDataObjectTowxDataObjectSimple(void *ptr) {
+ wxMetafileDataObject *src;
+ wxDataObjectSimple *dest;
+ src = (wxMetafileDataObject *) ptr;
+ dest = (wxDataObjectSimple *) src;
+ return (void *) dest;
+}
+
+static void *SwigwxMetafileDataObjectTowxDataObject(void *ptr) {
+ wxMetafileDataObject *src;
+ wxDataObject *dest;
+ src = (wxMetafileDataObject *) ptr;
+ dest = (wxDataObject *) src;
+ return (void *) dest;
+}
+
+#define new_wxMetafileDataObject() (new wxMetafileDataObject())
+static PyObject *_wrap_new_wxMetafileDataObject(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxMetafileDataObject * _result;
+ char *_kwnames[] = { NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxMetafileDataObject",_kwnames))
+ return NULL;
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ _result = (wxMetafileDataObject *)new_wxMetafileDataObject();
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} if (_result) {
+ SWIG_MakePtr(_ptemp, (char *) _result,"_wxMetafileDataObject_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ }
+ return _resultobj;
+}
+
+#define wxMetafileDataObject_SetMetafile(_swigobj,_swigarg0) (_swigobj->SetMetafile(_swigarg0))
+static PyObject *_wrap_wxMetafileDataObject_SetMetafile(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxMetafileDataObject * _arg0;
+ wxMetafile * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","metafile", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMetafileDataObject_SetMetafile",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetafileDataObject_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetafileDataObject_SetMetafile. Expected _wxMetafileDataObject_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMetafile_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMetafileDataObject_SetMetafile. Expected _wxMetafile_p.");
+ return NULL;
+ }
+ }
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ wxMetafileDataObject_SetMetafile(_arg0,*_arg1);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxMetafileDataObject_GetMetafile(_swigobj) (_swigobj->GetMetafile())
+static PyObject *_wrap_wxMetafileDataObject_GetMetafile(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxMetafile * _result;
+ wxMetafileDataObject * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+ char _ptemp[128];
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMetafileDataObject_GetMetafile",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMetafileDataObject_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMetafileDataObject_GetMetafile. Expected _wxMetafileDataObject_p.");
+ return NULL;
+ }
+ }
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ _result = new wxMetafile (wxMetafileDataObject_GetMetafile(_arg0));
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} SWIG_MakePtr(_ptemp, (void *) _result,"_wxMetafile_p");
+ _resultobj = Py_BuildValue("s",_ptemp);
+ return _resultobj;
+}
+
static void *SwigwxClipboardTowxObject(void *ptr) {
wxClipboard *src;
wxObject *dest;
{ "wxClipboard_Close", (PyCFunction) _wrap_wxClipboard_Close, METH_VARARGS | METH_KEYWORDS },
{ "wxClipboard_Open", (PyCFunction) _wrap_wxClipboard_Open, METH_VARARGS | METH_KEYWORDS },
{ "new_wxClipboard", (PyCFunction) _wrap_new_wxClipboard, METH_VARARGS | METH_KEYWORDS },
+ { "wxMetafileDataObject_GetMetafile", (PyCFunction) _wrap_wxMetafileDataObject_GetMetafile, METH_VARARGS | METH_KEYWORDS },
+ { "wxMetafileDataObject_SetMetafile", (PyCFunction) _wrap_wxMetafileDataObject_SetMetafile, METH_VARARGS | METH_KEYWORDS },
+ { "new_wxMetafileDataObject", (PyCFunction) _wrap_new_wxMetafileDataObject, METH_VARARGS | METH_KEYWORDS },
{ "wxURLDataObject_SetURL", (PyCFunction) _wrap_wxURLDataObject_SetURL, METH_VARARGS | METH_KEYWORDS },
{ "wxURLDataObject_GetURL", (PyCFunction) _wrap_wxURLDataObject_GetURL, METH_VARARGS | METH_KEYWORDS },
{ "new_wxURLDataObject", (PyCFunction) _wrap_new_wxURLDataObject, METH_VARARGS | METH_KEYWORDS },
{ "_wxPrintQuality","_size_t",0},
{ "_wxPrintQuality","_time_t",0},
{ "_byte","_unsigned_char",0},
+ { "_wxDataObject","_wxMetafileDataObject",SwigwxMetafileDataObjectTowxDataObject},
{ "_wxDataObject","_wxURLDataObject",SwigwxURLDataObjectTowxDataObject},
{ "_wxDataObject","_wxCustomDataObject",SwigwxCustomDataObjectTowxDataObject},
{ "_wxDataObject","_wxFileDataObject",SwigwxFileDataObjectTowxDataObject},
{ "_wxDataObject","_wxDataObjectSimple",SwigwxDataObjectSimpleTowxDataObject},
{ "_long","_unsigned_long",0},
{ "_long","_signed_long",0},
+ { "_wxDataObjectSimple","_wxMetafileDataObject",SwigwxMetafileDataObjectTowxDataObjectSimple},
{ "_wxDataObjectSimple","_wxCustomDataObject",SwigwxCustomDataObjectTowxDataObjectSimple},
{ "_wxDataObjectSimple","_wxFileDataObject",SwigwxFileDataObjectTowxDataObjectSimple},
{ "_wxDataObjectSimple","_wxPyBitmapDataObject",SwigwxPyBitmapDataObjectTowxDataObjectSimple},