473,405 Members | 2,421 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,405 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 2744

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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.