473,288 Members | 1,693 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,288 software developers and data experts.

swig-python -> shared (vs) static libraries

HI
I am new to SWIG & Python and right now i am in the process of
wrapping some "C" functionalities present in a static library for
python. I do have my C file "name.c" which just contains some helper
functions.
I tried to link my object files (e.g name.o & name_wrap.o) with the
static libraries (whose functionalities need to be wrapped) to form a
shared library that can be imported from Python. While doing so i
cannot be able to access the C data structure from Python and i got
all values as zero. I work in Linux gcc version.
I created my shared object like this:
ld -G name.o name_wrap.o -o _name.so -Bstatic -lfoo1 -lfoo2 -lfoo3.
On the other hand to dig more in to this i tried to simulate the
static libraries with simple dummy code in my file "name.c" so that i
can avoid linking the static libraries. This case i could be able to
retrieve the vaues of the data structure. I wonder if the problem
could be due to linking of the static libraries to create the shared
object.
Any body experienced the same problem or having related ideas pls help
me.
Best regards
Arun

Oct 29 '07 #1
0 2152

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

Similar topics

7
by: Christos TZOTZIOY Georgiou | last post by:
Last night I was compiling the latest python snapshot at my home Linux system (a K6-III @420 --the extra 20 Hz is overclocking :); then I tried building a shared version of the interpreter. I did...
2
by: free2cric | last post by:
Hi, I have two c++ static libraries say A.lib and B.lib. I am creating third static library C I create project in microsoft visual studio as win32 static library. I go to project-> settings ->...
1
by: Dani Peer | last post by:
Hi, We have few MFC 6.0 applications that are using many static libraries that are basically our infrastructure. Now we want to develop in C#, and we don't want to redesign all the infrastructure,...
1
by: rajesh_krec | last post by:
Hello Everybody, I'm using Microsoft Visual Studio .NET 2003 (with Vc7 compiler) I have some 15 projects each of which generate a static library when i build the solution in release mode. ...
2
by: Cliff Cooley | last post by:
Will static libraries generated by VB++ 6 always be usable by VC++ 7 applications ? Many thanks, Cliff
12
by: Bonj | last post by:
can you embed a resource into a static libary? I'm using a custom binary resource specified as a .bin file in the .rc file of the static library project I've got. I use FindResource, LoadResource,...
2
by: tomdean20 | last post by:
Does anyone have a general idea of the difference in performance when compiling PHP with primarily shared extensions rather than static? A recent Yahoo presentation "PHP at Yahoo" highlighted that...
3
by: salunkerahul | last post by:
Hello All, I have some static libraries generated on MSVC 2005 express edition and I have to use them along with static libraries created with MSVC 2003 and create an application on MSVC2003. ...
0
by: abarun22 | last post by:
HI I am new to SWIG & Python and right now i am in the process of wrapping some "C" functionalities present in a static library for python. I do have my C file "name.c" which just contains some...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.