Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Compiling extension module (linker error)

Reply
Thread Tools

Compiling extension module (linker error)

 
 
Paul Volkov
Guest
Posts: n/a
 
      10-22-2012
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);
}

//---------------------------------------------------------------------------
 
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: Compiling extension module (linker error) MRAB Python 0 10-23-2012 04:40 PM
Re: Compiling extension module (linker error) Paul Volkov Python 0 10-23-2012 07:00 AM
Re: Compiling extension module (linker error) MRAB Python 0 10-22-2012 06:03 PM
Using exceptions in defined in an extension module inside anotherextension module Floris Bruynooghe Python 1 12-24-2008 10:33 PM
Getting module object by name in C extension module Ilariu Raducan Python 2 07-14-2004 10:56 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57