📄 readme
字号:
(0) Introduction: The files in this directory demonstrates how to create a Win32 DLL for Tcl/TK. It creates a file called DEMO.DLL which can be loaded into wish41.exe via the "load" command. The Borland C++ makefile (Makefile.bc) and a C file (Demo.c) gives an example for all the steps that you need to take to create such a DLL to load under Tcl/Tk. Moreover, if you are using Tix and need to call the Tix C functions in your DLL, please refer to the Makefile.bc for the necessary compilation flags required.(1) Requirement: Tcl/Tk sources are required. You can download them from ftp://ftp.smli.com/pub/tcl/tcl75b3.zip ftp://ftp.smli.com/pub/tcl/tk41b3.zip Tix sources are required in you need to compile against Tix.DLL. It can be downloaded from ftp://ftp.xpi.com/pub/windows/tix41a2.zip(2) Compilation: (a) You must compile the Tcl/Tk sources first. The reason is we need the files tcl75.lib and tk41.lib, which are not released by Sun in their binary release. This is also a good exercise for you to set up your environment for compiling Tcl/Tk-based software. If you have BC++ (4.5 or later) installed on your system, edit the header part of the file tcl7.5b3\win\makefile.bc to reflect the settings in your environment. Then cd tcl7.5b3\win\ make -f makefile.bc When this finishes, you will get tcl75.dll and tcl75.lib in this directory. Do the same things to get tk41.dll and tk41.lib (b) Now cd to the DLLDemo directory and edit the file makefile.bc to to reflect the settings in your environment. Don't worry about the setting of the TIX directories yet. Now type make -f makefile.bc in this directory. When this is done, you should get a demo.dll. Start up wish41.exe. When you get the console screen, type the following in it: load demo.dll puts [demoHello] (c) If your DLL doesn't need to call the C functions of Tix (like our demo.dll), you can stop here. If you need to call the Tix C functions, then first install the Tix sources and get tix41.lib and tix41.dll. then change back to the DLLDemo directory and type make -f makefile.bc tix This will compile a demo_tix.dll that is linked to tix41.dll, tk41.dll and tcl75.dll.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -