473,739 Members | 9,109 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.NET c++ and python: unresolved external __imp__XXXXXXXX XX

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 SomeFunctionNam e
Script.obj : error LNK2019: unresolved external symbol __imp__PyObject _Repr
referenced in function "public: static struct _object * __cdecl
SomeFunctionNam e
Script.obj : error LNK2019: unresolved external symbol __imp__Py_Build Value
referenced in function "public: static struct _object * __cdecl
SomeFunctionNam e
Script.obj : error LNK2019: unresolved external symbol __imp__PyFloat_ Type
referenced in function "public: static struct _object * __cdecl
SomeFunctionNam e
Script.obj : error LNK2019: unresolved external symbol
__imp__PyTuple_ GetItem referenced in function "public: static struct _object
* __cdecl SomeFunctionNam e
Script.obj : error LNK2019: unresolved external symbol __imp__PyTuple_ Size
referenced in function "public: static struct _object * __cdecl
SomeFunctionNam e
Script.obj : error LNK2019: unresolved external symbol __imp__PyTuple_ Type
referenced in function "public: static struct _object * __cdecl
SomeFunctionNam e
Script.obj : error LNK2019: unresolved external symbol __imp__PyList_S etItem
referenced in function "public: static struct _object * __cdecl
SomeFunctionNam e
Script.obj : error LNK2019: unresolved external symbol __imp__PyList_N ew
referenced in function "public: static struct _object * __cdecl
SomeFunctionNam e
Script.obj : error LNK2019: unresolved external symbol __imp__PyList_G etItem
referenced in function "public: static struct _object * __cdecl
SomeFunctionNam e
Script.obj : error LNK2019: unresolved external symbol __imp__PyList_S ize
referenced in function "public: static struct _object * __cdecl
SomeFunctionNam e
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 2807

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

Similar topics

0
2504
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 testerl extern int hz(int i);
1
2202
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) and it's in pyerrors.h so I don't see why it misses it. Anyone have an idea? TIA
1
8415
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 file rc4.obj(rc4.c),it is creating the .dll file without any error. Command : ILINK32 rc4.obj 2.But,when we are trying to create .dll file with two .obj files with following errors.
0
358
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 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
3
3686
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. When I come to link to the Python library though from our one of our DLLs, I am getting the following unresolved externals: ------------------- embedded.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl...
11
4916
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: ============================ #include <iostream> #include <stdafx.h>
5
2660
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 Vista 64-bit machine with a Core 2 processor, and I'm compiling with a VC8. I downloaded the Python 2.5.1 source from python.org, and I opened the Visual Studio solution file that was in the PCbuild8 directory. I created a new x64 platform and...
0
1555
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 possible to work with DirectX - directmusic libs. Are there any ways to wrap it? *********************compilation errors ************************* msvc.link.dll bin\msvc-7.1\debug\threading-multi\playmusic.pyd bin \msvc-7.1\debu...
0
1354
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 (http://docs.python.org/ext/pure-embedding.html). I can compile and run this example on wxDevC++ with a mingwin compiler. However when I tried this with Borland C++ Builder 5 I get linker errors. The code is the same exactly (the same main.c file), the only
0
8969
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9479
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9337
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9266
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9209
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6054
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3280
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.