473,399 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 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 2743

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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.