OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [tix/] [win/] [DLLDemo/] [README] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
(0) Introduction:
2
 
3
    The files in this directory demonstrates how to create a Win32 DLL
4
    for Tcl/TK. It creates a file called DEMO.DLL which can be loaded
5
    into wish41.exe via the "load" command.
6
 
7
    The Borland C++ makefile (Makefile.bc) and a C file (Demo.c) gives
8
    an example for all the steps that you need to take to create such a
9
    DLL to load under Tcl/Tk. Moreover, if you are using Tix and need to
10
    call the Tix C functions in your DLL, please refer to the Makefile.bc
11
    for the necessary compilation flags required.
12
 
13
(1) Requirement:
14
 
15
    Tcl/Tk sources are required. You can download them from
16
 
17
        ftp://ftp.smli.com/pub/tcl/tcl75b3.zip
18
        ftp://ftp.smli.com/pub/tcl/tk41b3.zip
19
 
20
    Tix sources are required in you need to compile against Tix.DLL. It
21
    can be downloaded from
22
 
23
        ftp://ftp.xpi.com/pub/windows/tix41a2.zip
24
 
25
(2) Compilation:
26
 
27
    (a) You must compile the Tcl/Tk sources first. The reason is we
28
        need the files tcl75.lib and tk41.lib, which are not released
29
        by Sun in their binary release. This is also a good exercise
30
        for you to set up your environment for compiling Tcl/Tk-based
31
        software.
32
 
33
        If you have BC++ (4.5 or later) installed on your system, edit
34
        the header part of the file tcl7.5b3\win\makefile.bc to reflect
35
        the settings in your environment. Then
36
 
37
            cd tcl7.5b3\win\
38
            make -f makefile.bc
39
 
40
        When this finishes, you will get tcl75.dll and tcl75.lib in this
41
        directory.
42
 
43
        Do the same things to get tk41.dll and tk41.lib
44
 
45
    (b) Now cd to the DLLDemo directory and edit the file makefile.bc to
46
        to reflect the settings in your environment. Don't worry about the
47
        setting of the TIX directories yet.
48
 
49
        Now type
50
 
51
            make -f makefile.bc
52
 
53
        in this directory. When this is done, you should get a demo.dll. Start
54
        up wish41.exe. When you get the console screen, type the following
55
        in it:
56
 
57
            load demo.dll
58
            puts [demoHello]
59
 
60
    (c) If your DLL doesn't need to call the C functions of Tix (like our
61
        demo.dll), you can stop here. If you need to call the Tix C functions,
62
        then first install the Tix sources and get tix41.lib and tix41.dll.
63
        then change back to the DLLDemo directory and type
64
 
65
            make -f makefile.bc tix
66
 
67
        This will compile a demo_tix.dll that is linked to tix41.dll, tk41.dll
68
        and tcl75.dll.
69
 
70
 
71
 
72
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.