472,371 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,371 software developers and data experts.

.NET c++ and python: unresolved external __imp__XXXXXXXXXX

Ida
Hi,

I am trying to build an dll with Microsoft Visual C++ but during the linking
phase I get linking errors.

Script.obj : error LNK2019: unresolved external symbol
__imp__PyString_AsString referenced in function "public: static struct
_object * __cdecl SomeFunctionName
Script.obj : error LNK2019: unresolved external symbol __imp__PyObject_Repr
referenced in function "public: static struct _object * __cdecl
SomeFunctionName
Script.obj : error LNK2019: unresolved external symbol __imp__Py_BuildValue
referenced in function "public: static struct _object * __cdecl
SomeFunctionName
Script.obj : error LNK2019: unresolved external symbol __imp__PyFloat_Type
referenced in function "public: static struct _object * __cdecl
SomeFunctionName
Script.obj : error LNK2019: unresolved external symbol
__imp__PyTuple_GetItem referenced in function "public: static struct _object
* __cdecl SomeFunctionName
Script.obj : error LNK2019: unresolved external symbol __imp__PyTuple_Size
referenced in function "public: static struct _object * __cdecl
SomeFunctionName
Script.obj : error LNK2019: unresolved external symbol __imp__PyTuple_Type
referenced in function "public: static struct _object * __cdecl
SomeFunctionName
Script.obj : error LNK2019: unresolved external symbol __imp__PyList_SetItem
referenced in function "public: static struct _object * __cdecl
SomeFunctionName
Script.obj : error LNK2019: unresolved external symbol __imp__PyList_New
referenced in function "public: static struct _object * __cdecl
SomeFunctionName
Script.obj : error LNK2019: unresolved external symbol __imp__PyList_GetItem
referenced in function "public: static struct _object * __cdecl
SomeFunctionName
Script.obj : error LNK2019: unresolved external symbol __imp__PyList_Size
referenced in function "public: static struct _object * __cdecl
SomeFunctionName
Script.dll : fatal error LNK1120: 20 unresolved externals

The lib and exp files are generated but not the dll.
I'm using Visual C++ 7.1.3088, .NET 1.1.4322 SP1, Python2.1.1 and Windows
XP. I've checked in the Pyhon lib and the externals that start with __imp__
does not exist in the lib but the externals without the __imp__ does, i.e
_PyList_Size.

Maybe I should add that I can compile the dll with borland and I am now
trying to get the code to work with visual c++ as well.

I think the problem is that the __imp__ prefix is added to the variables by
mistake. Maybe because of some setting that I missed or got wrong in the
visual environment.

Does anyone recognise this problem?
Jul 21 '05 #1
0 2645

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Helmut Zeisel | last post by:
I want to build a static extension of Python using SWIG and VC++ 6.0 as described in http://www.swig.org/Doc1.3/Python.html#n8 for gcc. My file is testerl.i: ========================= %module...
1
by: Sean | last post by:
Hi, Trying to compile the PythonCE (Validus Medical Systems Python 2.3.4) using eVC++ 4.0 and the Smartphone2003 SDK. Linking is generating 28 errors. I dug into the first one (PyErr_Fetch)...
1
by: Aravind | last post by:
we have two files: 1. rc4.c (defines one function "create_pin()") 2. MyImpl.c(calling the function "create_pin()"),This implements JNI method. 1.When I am trying to create .dll file with one...
0
by: Ida | last post by:
Hi, I am trying to build an dll with Microsoft Visual C++ but during the linking phase I get linking errors. Script.obj : error LNK2019: unresolved external symbol __imp__PyString_AsString...
3
by: Martin Evans | last post by:
I've just been tasked with porting our desktop embedded Python support onto our existing CE offering. I've managed to compile the Python sources and have produced an armdbg420\python23.lib file. ...
11
by: Osiris | last post by:
I have these pieces of C-code (NOT C++ !!) I want to call from Python. I found Boost. I have MS Visual Studio 2005 with C++. is this the idea: I write the following C source file:...
5
by: danfike | last post by:
Hi all, So I'm working on a C++ application that will eventually embed or extend Python using Boost.Python, but I first need to get Python compiled correctly for my platform. I've got a Windows...
0
by: Ling | last post by:
I am using boost.python to wrap C++ function which includes directmusic libraries to simply play the midi, but lots of linkage errors "error LNK2001: unresolved external symbol". I wonder if it is...
0
by: DevEng | last post by:
Hi all, I am new to Python and trying to embed it into a c/c++ application. I started with examples from the documentation pages and go to the Pure Embedding example...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.