interfacing et al

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Feb 2007
Posts: 3
Reputation: saintlysav is an unknown quantity at this point 
Solved Threads: 0
saintlysav saintlysav is offline Offline
Newbie Poster

interfacing et al

 
0
  #1
Feb 18th, 2007
I have a complicated problem at hand, and im open to any suggestions for solving it.

Im working with a program called Psi which is written in C and has the GUI in Tcl/tk. A guy working on this earlier added 2 functions to get and set some properties of the program [in C]. The functions are straightforward.

I built the executable in Cygwin.

Now i need to extract values from these function using Python. I thought of using SWIG to generate the wrapper code. I would need these values at run-time. what are my options for this.

Would i need to link the additional files with the existing files, and build the executable again? the swig tutorial for windows said that i would need to build a dll to be used with the .py file, so that it can use the additional functions, written in C.

I experimented with swig, and for simple examples [standalone programs] it worked fine [i did this on linux]. Now i need to do this on windows, and ive never worked with dlls before. I have a vague idea abt what to do but im not sure of it. So could someone please help me out with some suggestions.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,511
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1480
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Still Learning

Re: interfacing et al

 
0
  #2
Feb 18th, 2007
Here is some information. For more info you can google for your question. Writing a dll is just too complicated to fully explain here. Read some of the google links.

How to interface a DLL with python is probably best to post in the phthon board.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 3
Reputation: saintlysav is an unknown quantity at this point 
Solved Threads: 0
saintlysav saintlysav is offline Offline
Newbie Poster

Re: interfacing et al

 
0
  #3
Feb 18th, 2007
Thanks for the links... ill post this on the python board for dll interface issues.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC