forked from miracl/MIRACL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devcpp.txt
96 lines (80 loc) · 1.64 KB
/
devcpp.txt
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
To build an example application using the Dev-CPP development tool on a PC
Use this mirdef.h
/*
* MIRACL compiler/hardware definitions - mirdef.h
*/
#define MR_LITTLE_ENDIAN
#define MIRACL 32
#define mr_utype int
#define MR_IBITS 32
#define MR_LBITS 32
#define mr_unsign32 unsigned int
#define mr_dltype long long
#define mr_unsign64 unsigned long long
#define MR_NOASM
#define MR_FLASH 52
#define MR_ALWAYS_BINARY
#define MAXBASE ((mr_small)1<<(MIRACL-1))
#define MR_BITSINCHAR 8
Create a "Static Library" C project called miracl, and "Add to Project" this
mirdef.h, miracl.h, and all of these files
mrcore.c
mrarth0.c
mrarth1.c
mrarth2.c
mrsmall.c
mrio1.c
mrio2.c
mrgcd.c
mrjack.c
mrxgcd.c
mrarth3.c
mrbits.c
mrrand.c
mrprime.c
mrcrt.c
mrscrt.c
mrmonty.c
mrpower.c
mrsroot.c
mrlucas.c
mrshs.c
mrshs256.c
mraes.c
mrgcm.c
mrstrong.c
mrcurve.c
mrbrick.c
mrebrick.c
mrzzn2.c
mrzzn2b.c
mrzzn3.c
mrecn2.c
mrfast.c
mralloc.c
mrshs512.c
mrflash.c
mrfrnd.c
mrdouble.c
mrround.c
mrbuild.c
mrflsh1.c
mrpi.c
mrflsh2.c
mrflsh3.c
mrflsh4.c
mrec2m.c
mrgf2m.c
Compile this project to create the static library file miracl.a
Close this project, and open a new C++ console application called demo.
Remove the default main program main.cpp from the project, and "Add to Project" the files
big.h
big.cpp
ecn.h
ecn.cpp
pk-demo.cpp
Now click on "Project Options", and click on the "Parameters" Tab.
Then click on "Add Library or Object", and find the miracl.a file created earlier.
Now compile and run the program. One problem - it runs very fast and then exits. So
edit pk-demo.cpp and and just before the final "return 0;" statement add the line "cin >> ia;"
Now try again...