The version of TCL I am using is tcl8.0.x. Below is the makefile I
am using and an example of my code.
Any idea whats wrong?
##### CODE ######
#include <tcl.h>
int Test_sample_Cmd(
ClientData clientData,
Tcl_Interp *interp,
int argc,
char *argv[])
{
return TCL_OK;
}
int Tetfile_Init(
Tcl_Interp *interp)
{
Tcl_CreateCommand(interp, "test_sample", Test_sample_Cmd,
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
return TCL_OK;
}
##### MAKEFILE ######
# compiler-related
CXX = /opt/aCC/bin/aCC
CXXOPTS = -v -Wl,-v -O +z +DAportable
CXXINCS = -I$(HOME)/tcl/include -I$(SRCDIR)
CXXDEFS = -D__HPUX__ -D_TCL80 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1
-Dunix
CXXFLAGS = $(CXXOPTS) $(CXXINCS) $(CXXDEFS)
# linker-related
LD = /usr/bin/CC
LDFLAGS = -b -L$(HOME)/tcl/lib -v -Wl,-v -Wl,+vallcompatwarnings
LOADLIBES = -lstd -ldld -lC -lCsup -lm -ltcl8.0
# general
OBJ_EXT = o
SO_EXT = sl
RM = /usr/bin/rm -f
# main
BASEDIR = ${HOME}/projects
WORKDIR = $(BASEDIR)/src/test
SRCDIR = $(WORKDIR)
LIBDIR = $(BASEDIR)/lib
OBJDIR = $(WORKDIR)
LIBRARY = $(LIBDIR)/test.$(SO_EXT)
OBJS = \
$(OBJDIR)/test.$(OBJ_EXT)
all :: $(LIBRARY)
$(OBJDIR)/test.$(OBJ_EXT) : $(SRCDIR)/test.c
$(CXX) $(CXXFLAGS) -o $@ -c $(SRCDIR)/test.c
$(LIBRARY) : $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(LOADLIBES) $(OBJS)
clean ::
$(RM) $(OBJS) $(LIBRARY) a.out core
*** tcl8.0.5/unix/tclLoadShl.c-orig Thu Apr 1 15:30:14 1999
--- tcl8.0.5/unix/tclLoadShl.c Thu Apr 1 15:30:42 1999
***************
*** 60,66 ****
shl_t handle;
Tcl_DString newName;
! handle = shl_load(fileName, BIND_IMMEDIATE, 0L);
if (handle == NULL) {
Tcl_AppendResult(interp, "couldn't load file \"", fileName,
"\": ", Tcl_PosixError(interp), (char *) NULL);
--- 60,66 ----
shl_t handle;
Tcl_DString newName;
! handle = shl_load(fileName, BIND_IMMEDIATE|BIND_VERBOSE, 0L);
if (handle == NULL) {
Tcl_AppendResult(interp, "couldn't load file \"", fileName,
"\": ", Tcl_PosixError(interp), (char *) NULL);
Jochen.
--
-----------------------------------------------------------------------
Jochen Loewer HP - CSDE Boeblingen 778-6882 (TELnet)
mailto:jochen...@bbn.hp.com ++49-(0)7031-14-6882 (phone)
-----------------------------------------------------------------------
THANKYOU! This has been bugging me for some time but I never got around to
looking into it.
Great patch!!!!!
Matt
Try adding -Wl,+s,+b,path_to_installed_tcl_libs onto your LDFLAGS. Make
sure you use the path where you have installed the Tcl libs (such as
/usr/local/tcl/lib), not where you built
Tcl. We added the BIND_VERBOSE flag to the shl_load() call in tclLoadShl.c
before building our Tcl distribution so we can get a little better idea
of what the problem is when a load fails without having to resort to nm
and other tactics.
Hope this helps,
Marc
--
Marc Rossi
mailto:ma...@mcs.com
Regards,
Ibrahim khalil
Well, there is an MPEG library freely available somewhere and there is an
mpeg_encode program lying around somewhere on the 'Net so you could
conceivably use the latter to create your movies and create a Tcl extension
for the former.
Before doing so, Id' go check http://www.purl.org/net/Tcl-FAQ/part4.html and
part5.html to see if that hasn't already been done.
L
--
Penguin Power! Nothing I say reflects the views of my employer
Laurent Duperval mailto:laurent....@cgi.ca
CGI - SARM Project Phone: (514) 391-9523