473,396 Members | 2,147 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,396 software developers and data experts.

C\C++ Python embedding linking problem

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
difference is the library I am using, as Borland requires OMF format
library (I have converted it from). I am using the same binary
distribution of Python on win XP. As far as I can tell the functions
the linker complains about are not in the converted library or the
original.

[Linker Error] Unresolved external '_Py_InitModule4TraceRefs'
referenced from C:\PROGRAM FILES\BORLAND\CBUILDER5\PROJECTS\EXP
\TRY2\PETMAIN.OBJ
[Linker Error] Unresolved external '__Py_RefTotal' referenced from C:
\PROGRAM FILES\BORLAND\CBUILDER5\PROJECTS\EXP\TRY2\PETMAIN. OBJ
[Linker Error] Unresolved external '__Py_NegativeRefcount' referenced
from C:\PROGRAM FILES\BORLAND\CBUILDER5\PROJECTS\EXP\TRY2\PETMAIN. OBJ
[Linker Error] Unresolved external '__Py_Dealloc' referenced from C:
\PROGRAM FILES\BORLAND\CBUILDER5\PROJECTS\EXP\TRY2\PETMAIN. OBJ

As far as I can tell it is a problem with my Borland setup but I
cannot find what it is...

Any help is greatly appreciated,

Ross
Jun 27 '08 #1
0 1330

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

Similar topics

4
by: Anand K Rayudu | last post by:
Hi All, I have one problem with embedding python into my application. on HP-UX11 i created my application with linking libPython2.3.a And with my product i supply all extension dlls and with...
0
by: Marcin 'Qrczak' Kowalczyk | last post by:
I made a bridge between my language Kogut <http://qrnik.knm.org.pl/~qrczak/kogut/kogut.html> and Python, which gives my language instant access to Python libraries. (I'm only linking to libpython,...
2
by: Roose | last post by:
With some googling I have found these resources: http://docs.python.org/ext/win-dlls.html http://www.python.org/doc/faq/windows.html I have a large Win32/MFC/C/C++ application that has an...
1
by: Tommy Nordgren | last post by:
I want to write an application that embeds and extends (at least) the Python and Perl interpreters. Now i want to find as much as possible about the Python tools used for extending and embedding...
8
by: Brennus | last post by:
I have a dll/so which embeds python. I can verify it works by compiling it as an executable and adding an appropriate main. I tried to write unit tests for this library with ctypes and a simple...
17
by: seberino | last post by:
How can a proprietary software developer protect their Python code? People often ask me about obfuscating Python bytecode. They don't want people to easily decompile their proprietary Python app....
3
by: John Pye | last post by:
Hi all I have been working on some new code that embeds python in an C application. The embedding is working fine under Linux but crashing under Windows (XP) when I reach the following step. ...
4
by: Julian | last post by:
Hi, first of all, I have to say I am new to Python. I have been working with a finite element analysis program written in c++. now, I am trying to 'rebuild' this code (possibly a full re-write)...
0
by: marcell71 | last post by:
I'm trying to get Boost.Python to working using the instructions here: http://www.boost.org/libs/python/doc/building.html. I am on step 3.1.4 and am getting a linking error that I can't figure out....
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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...

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.