Hello, my name is Michaël. Now I am in work of Diploma and I doing an interface graphic in Tcl/Tk. It's the first time for me Tcl/TK, I am initial, excuse me if my question is stupid.
I would like to call functions written out of C++ since TCL/TK. I used SWIG for created a DLL readable by TCL/TK.
Until here, it's OK. I successful to call a C++ function which has like parameter an Integer (since TCL/TK).
Then I desired called my function with like parameter a pointer on array. It's doesn't work !!
This error is generated:
Type error. Expected a pointer
while executing
"Interface_Diplome Tab"
My question is:
How I must make for send a pointer on table? Is my array well to declare? Which error I made?
Tanks you very much !!!
#####declaration of my function C
int Interface_Diplome(int *);
#####my programm Tcl
#creation of my array
set tab(0) 7
set tab(1) 6
set tab(2) 5
set tab(3) 4
set tab(4) 3
set tab(5) 2
set tab(6) 1
set tab(7) 0
#call the dll
load Interface_Diplome.dll Interface_Diplome
#Call the function "Interface_Diplome" with like argument a pointer on array
Interface_Diplome tab
I would like to call functions written out of C++ since TCL/TK. I used SWIG for created a DLL readable by TCL/TK.
Until here, it's OK. I successful to call a C++ function which has like parameter an Integer (since TCL/TK).
Then I desired called my function with like parameter a pointer on array. It's doesn't work !!
This error is generated:
Type error. Expected a pointer
while executing
"Interface_Diplome Tab"
My question is:
How I must make for send a pointer on table? Is my array well to declare? Which error I made?
Tanks you very much !!!
#####declaration of my function C
int Interface_Diplome(int *);
#####my programm Tcl
#creation of my array
set tab(0) 7
set tab(1) 6
set tab(2) 5
set tab(3) 4
set tab(4) 3
set tab(5) 2
set tab(6) 1
set tab(7) 0
#call the dll
load Interface_Diplome.dll Interface_Diplome
#Call the function "Interface_Diplome" with like argument a pointer on array
Interface_Diplome tab