Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31880

Compiling extension module (linker error)

Date 2012-10-22 14:55 +0400
Subject Compiling extension module (linker error)
From Paul Volkov <capt-obvious@yandex.ru>
Newsgroups comp.lang.python
Message-ID <mailman.2621.1350903324.27098.python-list@python.org> (permalink)

Show all headers | View raw


I am trying to compile an extension module with C++ Builder 6 for Python 3.3.
I converted python33.lib using coff2omf.exe and added this library
into my project.
I wonder why I get this error message while building:

[Linker Error] Unresolved external '_PyModule_Create2TraceRefs'
referenced from 'D:\WORK\FROMAGE\OUT\ROSE_UNIT.OBJ'

My source file:

//---------------------------------------------------------------------------

#include <Python.h>
#include <windows.h>
#pragma argsused

BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fwdreason, LPVOID lpvReserved)
{
        return 1;
}

static PyObject* __declspec(dllexport) testik(PyObject* self, PyObject* args)
{
return NULL;
}

static PyMethodDef FundRoseMethods[] = {
{"testik", testik, METH_VARARGS, "perform a test"},
{NULL, NULL, 0, NULL}
};

static struct PyModuleDef FundRoseModule = {
PyModuleDef_HEAD_INIT,
"FundRose",
NULL,
-1,
FundRoseMethods
};

PyMODINIT_FUNC
PyInit_FundRose(void)
{
return PyModule_Create(&FundRoseModule);
}

//---------------------------------------------------------------------------

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Compiling extension module (linker error) Paul Volkov <capt-obvious@yandex.ru> - 2012-10-22 14:55 +0400

csiph-web