-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2013-10-07 17:19, Orm Finnendahl wrote:
Hi,
trying to load a tcl file in a custom extern's setup routine with:
sys_vgui("load /home/orm/img.tcl;\n");
I get the following error when loading that extern in a pd session:
(Tcl) UNHANDLED ERROR: couldn't load file "/home/orm/img.tcl": /home/orm/img.tcl: invalid ELF header while executing "load /home/orm/img.tcl" ("uplevel" body line 1) invoked from within "uplevel #0 $docmds"
The extern has been built with the following flags:
gcc -fPIC -DPD -g -O2 -funroll-loops -fomit-frame-pointer -Wall -W -Wshadow -Wstrict-prototypes -Werror -Wno-unused -Wno-parentheses -Wno-switch -I/usr/include -I/home/orm/work/install/pd-0.44-3/src -I/usr/local/include -L/usr/local/lib -o img.o -c img.c
It's on a 64bit linux with custom pd-0.44-3. There is obviously a 32-bit/64-bit incompatibility but I have no clue who is causing this and how to fix it. Can anybody help?
the problem is not the extern ('img.pd_linux') but rather the tcl-file 'img.tcl', or even more rather the way you try to load it.
assuming that "/home/orm/img.tcl" is an ordinary tcl script file (text!, not binary), then you shouldn't use the "load" command to load it; according to the tcl-docs:
load - Load machine code and initialize new commands.
is this really what you want? or would you rather have something like the "source" command:
source - Evaluate a file or resource as a Tcl script
fgamsdr IOhannes