Filewatcher File Search File Search
Content Search
» » » » swig-1.0.src.tgz » Content »
pkg://swig-1.0.src.tgz:479827/SWIG1.0/Examples/tcl/dynac++/  info  downloads

swig…  more info»


This example shows how you can make a dynamically loadable
C++ module for Tcl.  There are a number of things you need
to know :

	1.   Don't use static constructors.

	2.   You may need to edit the file Makefile.template
             to get the right library files

In order to build a C++ module, it's necessary to do some funny
tricks with the linker.  For g++, running under Solaris, the
compile process looks like this :

c++ -c shapes_wrap.c  -I/usr/local/include
ld -G  shapes_wrap.o  -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \
                      -L/usr/local/lib -lg++ -lstdc++ -lgcc -o
                                         This is critical!

To run the example, just type 'tclsh7.5 shapes.tcl'.  If you get
some output and no error messages, then you've done it right.

Good luck!
Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017