-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
68 lines (49 loc) · 1.94 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
README ../test_dll_dyn/
Testprogram for a dynamic DLL / shared-overlay
- loaded late - must be done explicit; unloaded after use;
- main can use functions exported of dll;
- dll can use functions/variables exported of main;
- operating-systems: Linux, Microsoft-Msys2, Microsoft-MS-VC
process is:
- main does: load dll, start dll-function, unload dll;
- or: load dll, start dll-function;
- or: unload dll;
- dll-function can use imported functions/variables of main;
.........................................
Using Linux:
make -f main.mak clean - clean after changing OS
make -f dll1.mak - makes dll1.dll
make -f main.mak - makes main
./main - start main (key r to start, q to stop gdb).
.........................................
Using Microsoft-Msys2:
make -f main.mak clean - clean after changing OS
make -f main.mak - makes main
make -f dll1.mak - makes dll1.dll
./main.exe - start main (key r to start, q to stop gdb).
.........................................
Using Microsoft-VC:
nmake -f main.nmak clean - clean after changing OS
- create file main.def - or use existing
nmake -f main.nmak - makes main.exe and main.lib
nmake -f dll1.nmak - makes dll1.dll
main.exe - start main
Format of .def - file:
- .def file is a list of exported functions/variables, manually or from gendef;
- for testExample:
EXPORTS
i1TestMain
main_export
.........................................
Files Linux, Microsoft-Msys2:
main.mak build main.exe
main executable Linux
main.exe executable Msys2 or Microsoft-VC
main.c main
main.def exported functionNames and variableNames of main
os_dll_uix.c functions load/start/unload dll for Unix
os_dll_ms.c functions load/start/unload dll for MS
dll1.mak build dll
dll1.dll dll for Linux or Msys2 or Microsoft-VC
dll1.c source dll1
# EOF