473,756 Members | 5,955 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SWIG, MinGW, and Python 2.3 problem

I'm attempting to follow the instructions at
http://sebsauvage.net/python/mingw.html, without luck.

I have Python 2.3, MinGW 3.2.3, ans SWIG 1.3.19.

I get an export error on "initexampl e" when attempting the example. Do
I need some extra switches to get SWIG to create that function? Or is
it something else?

Here's my example build:
C:\Phil\python\ Extensions\exam ple>python setup.py build
--compiler=mingw3 2
running build
running build_ext
building 'example' extension
swigging example.i to example_wrap.c
C:\Phil\python\ Extensions\SWIG-1.3.19\swig.exe -python -o
example_wrap.c example.i
creating build
creating build\temp.win3 2-2.3
creating build\temp.win3 2-2.3\Release
c:\mingw\bin\gc c.exe -mno-cygwin -mdll -O -Wall -Ic:\python23\in clude
-Ic:\python23\PC -c example.c -o
build\temp.win3 2-2.3\Release\exa mple.o
c:\mingw\bin\gc c.exe -mno-cygwin -mdll -O -Wall -Ic:\python23\in clude
-Ic:\python23\PC -c example_wrap.c -o
build\temp.win3 2-2.3\Release\exa mple_wrap.
o
example_wrap.c: 170: warning: `SWIG_TypeDynam icCast' defined but not
used
example_wrap.c: 182: warning: `SWIG_TypeName' defined but not used
example_wrap.c: 188: warning: `SWIG_TypeQuery ' defined but not used
example_wrap.c: 423: warning: `SWIG_ConvertPt r' defined but not used
example_wrap.c: 515: warning: `SWIG_ConvertPa cked' defined but not used
writing build\temp.win3 2-2.3\Release\exa mple.def
creating build\lib.win32-2.3
c:\mingw\bin\gc c.exe -mno-cygwin -shared -s
build\temp.win3 2-2.3\Release\exa mple_wrap.o
build\temp.win3 2-2.3\Release\exa mple.o build\temp.win3 2-2.3\Re
lease\example.d ef -Lc:\python23\li bs -Lc:\python23\PC Build -lpython23
-o build\lib.win32-2.3\example.pyd
Cannot export initexample: symbol not defined
error: command 'gcc' failed with exit status 1
Jul 18 '05 #1
0 2091

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

Similar topics

1
2223
by: Alan Sheehan | last post by:
Hi, I am considering scripting a large C++ application. In particular I am interested in test driving and end-user scripting the "application layer" in Python and giving it access to a large collection of C++ objects and their methods. I note that SWIG is a mature tool and refers to supporting Python v1.x.
1
1150
by: JD | last post by:
I hope I didn't post this twice, but I didn't see my earlier posting, so I've posted it again. Please excuse of me you see a 2nd one, but I suspect this might be a problem with our mailer. This is another Python problem, I think might be unrelated to the earlier bug I found. This is related to a question I have about Python hanging up either from a shell, or by importing a module.
0
1537
by: Bo Peng | last post by:
Dear List, I have had success in using vector.i of SWIG to map between c++: foo(vector<int>) python: foo() However, the map of vector of objects fails: c++: foo(vector<obj> )
3
2098
by: It's me | last post by:
I am playing around with SWING building a Python module using the no brainer example in http://www.swig.org/tutorial.html. With that first example, /* File : example.c */ #include <time.h> double My_variable = 3.0; int fact(int n) {
0
2725
by: Bill Davy | last post by:
I am working with MSVC6 on Windows XP. I have created an MSVC project called SHIP I have a file SHIP.i with "%module SHIP" as the first line (file is below). I run SHIP.i through SWIG 1.3.24 to obtain SHIP_wrap.cpp and SHIP.py; the latter contains the line "import _SHIP". I compile SHIP_wrap.cpp and a bunch of files into a DLL which I have the
1
2159
by: Java and Swing | last post by:
I am trying to wrap some C code I have. Currently I have something like... defs.h ----------- typedef unsigned long MY_DIGIT; myapp.c ------------- void MakeDigits(MY_DIGIT digits) {
1
2298
by: kpd | last post by:
I am using distutils and mingw to create an extension from some C++ code for Python 2.4.1. It builds fine, but on import the following error comes up: python.exe - Entry Point Not Found The procedure entry point _ctype could not be locatid in the dynamic link library msvcr71.dll I am not using ctype directly, but references to it apprear to be linked in by mingw in the resulting pyd file.
0
323
by: Keith Sabine | last post by:
Hi Did you ever find a solution to this? I am having the exact same problem... - Keith I'm trying to pass a proxy class instance (SWIG generated) of CClass, to a python callback function from C++. The proxy class instance of CClass is created from a pointer to the C++ class CClass.
0
1341
by: Basha J P M | last post by:
I am beginner in python. I am working through the tutorial examples from http://www.swig.org/ and have run into some problems. I took the following command instructions from the tutorial on swig.org: http://www.swig.org/tutorial.html I have written example.c and example.i as described in the above tutorial. My first attempt at compiling the libraries was this:
0
9275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9873
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
9846
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
9713
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...
1
7248
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5142
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...
0
5304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3806
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
2
3359
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.