📄 msvisual.txt
字号:
To create MIRACL applications under Microsoft Windows using Microsoft C++
version 6.0, follow these steps.
1. Create a new empty project of type "Win32 Console Application"
Give it the name of the associated main project file, e.g. limlee
for limlee.cpp
2. Click on "Project", and then on "Add to Project", and then on "Files"
3. Select "library files (.lib)" from the "Files of type" drop-down list.
Look for the precompiled MIRACL library file ms32.lib, and insert it
into the project.
4. Add the main project file (e.g.limlee.cpp) into the project.
5. Only if it is a C++ main project file, also add into the project any
other needed files, like big.cpp/monty.cpp etc. Those required are
specified in the comments at the start of the main project file, e.g.
* Requires: big.cpp monty.cpp
This step is not required for C projects.
6. Now click on "Project" and then on "Settings". Click the C/C++ tab and
select the "preprocessor" category. Find the box "Additional Include
Directories", and specify a path to the miracl header files,
mirdef.h/miracl.h/big.h etc..
7. Make sure that any files needed by the application are available in the
directory from which the application is run. For example *.key *.dss,
or *.ecs files
8. Now build and run the project.
To create a new version of the MIRACL library,
1. Compile and run the config.c utility, and rename the generated mirdef.tst
to mirdef.h
Note that Microsoft C has a 64-bit integer data type called __int64
2. Create a new project of type "Win32 Static Library". Then click on "Finish".
3. Add in the appropriate files mr*.c. The ones required are those listed in
miracl.lst (also generated by the config utility).
4. Now click on "Project" and then on "Settings". Click the C/C++ tab and
select the "preprocessor" category. Find the box "Additional Include
Directories", and specify a path to the miracl header files
mirdef.h and miracl.h
5. Now build the project and create the MIRACL library.
If using MIRACL within an MFC based Win32 project, here are some hints.
1. Build a MIRACL library with MR_NO_STANDARD_IO defined in mirdef.h
The config.c utility can be used as usual to create a suitable mirdef.h
2. If using the C++ MIRACL classes, don't forget to change the default project
settings for the MIRACL implementation files such as big.cpp to "not using
pre-compiled headers".
3. Don't forget that MIRACL is a C library, not C++. To call MIRACL routines
directly from a C++ program you must:-
extern "C"
{
#include <miracl.h>
}
If using C++, its probably preferable to access MIRACL via the C++ wrapper
classes such as implemented by big.h/big.cpp. See big.h file for more tips.
4. To display a big number, convert it first to a string. See the comments at
the start of big.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -