For Programmers: Free Programming Magazines  


Home > Archive > Tcl > May 2004 > C++ ,Tcl & their connections.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author C++ ,Tcl & their connections.
Mohsen Pahlevanzadeh

2004-05-17, 8:32 am

Dears,I wrote a C++ program that i want to write a Tcl program that it
uses my functions in my program.It means i want to call my functions
what it wrote in C++,but i call them from Tcl.
Yours,Mohsen.
Ralf Fassel

2004-05-17, 11:42 am

* m_pahlevanzadeh@yahoo.com (Mohsen Pahlevanzadeh)
| It means i want to call my functions what it wrote in C++,but i call
| them from Tcl.

Does
http://mini.net/tcl/2074
answer your question?

If not, please post a concrete code example.

R'
Bob Techentin

2004-05-17, 11:42 am

"Mohsen Pahlevanzadeh" <m_pahlevanzadeh@yahoo.com> wrote
> Dears,I wrote a C++ program that i want to write a Tcl program that

it
> uses my functions in my program.It means i want to call my functions
> what it wrote in C++,but i call them from Tcl.


You have to write some C code to wrap your C++ functions. You might
want to look at SWIG - the Simplified Wrapper Interface Generator,
http://www.swig.org/ . It will write the code for you.

Bob
--
Bob Techentin techentin.robert@NOSPAMmayo.edu
Mayo Foundation (507) 538-5495
200 First St. SW FAX (507) 284-9171
Rochester MN, 55901 USA http://www.mayo.edu/sppdg/

..


Robert Heller

2004-05-17, 9:32 pm

m_pahlevanzadeh@yahoo.com (Mohsen Pahlevanzadeh),
In a message on 17 May 2004 04:26:58 -0700, wrote :

MP> Dears,I wrote a C++ program that i want to write a Tcl program that it
MP> uses my functions in my program.It means i want to call my functions
MP> what it wrote in C++,but i call them from Tcl.
MP> Yours,Mohsen.

SWIG is your friend. Visit:

http://swig.sourceforge.net/

MP>

\/
Robert Heller ||InterNet: heller@cs.umass.edu
http://vis-www.cs.umass.edu/~heller || heller@deepsoft.com
http://www.deepsoft.com /\FidoNet: 1:321/153







Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com