Files
2025-10-14 09:52:32 +09:00

27 lines
1.7 KiB
Plaintext

To be able to use ctypes (uint8, uint16 uint32 ...) and also declare pointers, You should use the functions declared in t32util.c.
There are 4 types of declation in this file:
- Global variables: nombre, nombre_1, nombre_2, nombreunit8, nombreunit8_1, nombreunit8_2, nombreunit16, nombreunit16_1, nombreunit16_2, nombreunit32, nombreunit32_1, string
- Functions to assign the global variable to a TCL variable (start with new): newintptr,newintptr_1, newintptr_2, newuint8, newuint16, newuint32, newuint8ptr, newuint8ptr_1, newuint8ptr_2, newuint16ptr, newuint16ptr_1....
- Functions to set value to a variable (start with set): setintptr, setuint8ptr, setuint16ptr, setuint32ptr, setstringptr
- Functions to print contant of a variable (start with get): getintpointeur, getuint16, getuint32, getuint8ptr, getuint16ptr, getuint32ptr, getstringptr
If you need to add further function or global variable, you need to declare them in t32util.c and in t32.i(twice, follow the examples existent)
To compile the dll
In windows :
- The makefile needs the SWIG application.
- It can be downloaded using this link http://prdownloads.sourceforge.net/swig/swigwin-3.0.5.zip.
- The makefile needs also the TCL lib and headers.
- TCL source can be obtained from http://www.tcl.tk/software/tcltk/download.html
- To compile TCL lib, follow instruction under <TCL directory>\win\README
- Current DLL are compiled with TCL version 8.6.4
In Linux :
- The makefile.linux needs the swig application.
- It can be downloaded using sudo apt-get install swig
- You may need to install TCL and adapt its include directory (corresponding headers and lib included under this directory)