How to install ace in Linux:
1. First, determine the installation path of ACE and create the corresponding directory.
Here, we install ace in the/home/zhc/ACE/directory, first execute
Mkdir/home/zhc/ace
2. Then, extract the obtained ace source code package to this directory.
Tar zxvf ACE-5.4.tar.gz/home/zhc/ace
3. At this time, a subdirectory named ace_wrappers will be created under the ace directory. All the source code, tools, and examples of ACE are in this directory.
First enter the Directory and run
CD/home/zhc/ACE/ace_wrappers
Create a sub-directory to store the destination file after Ace compilation.
Mkdir build
CD build
4. Then, execute the configure script, check your system environment, configure and generate makefile files suitable for your system.
During configurescript execution, you can add multiple configuration items. For more information, see the ace-install.html file in the ace_wrappersdirectory,
For the redhat9 system, Ace can work well without adding any parameters.
../Configure
5. After a long check and configuration, if there is no problem, you can start compiling.
This step is simple.
Make
Then, make a cup of tea and wait quietly.
6. If the compilation passes smoothly (usually this is the case), congratulations, you have already succeeded more than half of it. The following is just a bit of configuration work to be done.
The next step is installation. This step is optional. The purpose is to install the compiled ace library files, header files, and manual pages in the corresponding directory of/usr/local, for future convenience, we recommend that you perform this step.
Su
Root's password
Make install
7. After installation, we can complete the final configuration.
First, set the environment variable ace_root and run
Setenv ace_root/home/zhc/ACE/ace_wrappers
Note that the path depends on your actual situation.
If you do not want to manually set the path every time, you can edit your Bash configuration file and execute
CD
Vi. bash_profile
Add the following two lines
Ace_root =/home/work/research/ACE/ace_wrappers
Export ace_root
8. Then, create a file named config. h In the $ ace_root/ace Directory, which contains the following line
# Include "ACE/config-linux.h"
Or, for simplicity, you can also directly create a symbolic link pointing to the config-linux.h and execute
Ln-s config-linux.h config. h
9. Similarly, create a file named platform_macros.gnu in the $ ace_root/include/makeinclude Directory, which contains the following line
Include $ (ace_root)/include/makeinclude/platform_linux.gnu
Alternatively, you can directly create a symbolic link pointing to platform_linux.gnu to execute
Ln-s platform_linux.gnu platform_macros.gnu
10. In the last step, set the environment variable LD_LIBRARY_PATH and run
Setenv LD_LIBRARY_PATH $ ace_root/ACE: $ ace_root/lib:/usr/local/lib: $ LD_LIBRARY_PATH
Or in ~ /. Add the following two lines to the bash_profile file:
LD_LIBRARY_PATH = $ ace_root/ACE: $ ace_root/lib:/usr/local/lib: $ LD_LIBRARY_PATH
Export LD_LIBRARY_PATH
========================================================== ========================================================== =====
Install ace in Windows
1. compress the ace distribution package to a directory, which generates an ace_wrappers directory containing the ace. In the next step, assume that the ace distribution package is decompressed to ace_root = C:/ace_wrappers, so the Ace will exist in the ace_root/ace directory.
2. Create a file in the ace_root/ace directory named config. h with the following content:
# Include "ACE/config-win32.h"
3. Load the ACE project file (ace_root/ACE/ace. DSW) in VC ++)
4. Each project contains multiple configurations, which are debug/release,
Mix MFC/non-mfch and static/dynamic library versions. Determine the structure you need (for example, the debugging code requires the debugging version of ACE ). All these differences
You can use different modes to construct applications with different configurations, or change ACE/config. h to change the different configurations on NT.
Note: If you use dynamic connections, make sure that ace_root/bin is added to your path environment variable. Otherwise, you will find the ace when running the program. DLL or aced. DLL problems.
5. If you build an ace on Windows NT or Windows 2 K, you can start constructing it immediately without any changes. If you build it on Windows 9x/me, you must
Add a line before the # include block of ace_root/ACE/config. H:
# Define ace_has_winnt4 0
This removes some special winnt/Win2k codes from the ace.
6. If you want to use the standard C ++ header file (iostream, cstdio... defined in C ++ standard draft) that comes with msvc .....), The
Add a line before the # include block of ace_root/ACE/config. H:
# Define ace_has_standard_cpp_library 1
7. if you need to use it with MFC, add the following definition to your Config. note: If you want to use a new spawn thread, you must ensure that the thr_use_afx flag is used for the spawn thread.
# Define ace_has_mfc 1
?? Note: I cannot use this macro to compile Ace. If you have any idea, please kindly advise.
8. If you want to build a static ace version, you need to define ace_as_static_libs in config. H. This macro must also be defined in application projects that want to use the static ace version.
As an option, you can
# Add a line before include statement in ace_root/ACE/config. H:
# Define ace_no_inline
To cancel function inline and reduce the size of the static library (and your runtime code.
9. Ace DLL and Lib library naming rules:
We use the following rules to clearly use the msvc ace DLL and Lib files.
"Library/DLL name" + (is it a static library? "S": "") + (including debugging information? "D": "") + {". dll" | ". lib "}
You can find more information about ace in msvc.
Integrate ace with vc6
1. Open tools> Options> Directories
Add the following content:
Executable file:
C:/ace_wrappers/bin
Include file:
C:/ace_wrappers/
Library files:
C:/ace_wrappers/ace
Source files:
C:/ace_wrappers/
2. Add C:/ace_wrappers/bin to the path of the system environment variable.
When using it in the MFC program, you should add the following in initinstance:
Wsdata;
Word verrequested = makeword (2, 2 );
Wsastarup (verrequested, & wsdata)