ACE compilation and installation in Linux-general Linux technology-Linux programming and kernel information. The following is a detailed description. Operating System: RedHat AS3 or AS4 or AS5
ACE version: ACE-5.6
Installation Process:
Download ace-5.6.tar.gz.
After the download is complete, decompress the tar-zxvf ACE-5.6.tar.gz User Login directory. My decompression path is/home/king/ACE_wrappers.
Set environment variables:
I prefer to use csh, so add the ACE_ROOT environment variable in the. cshrc file (bash configuration in. bashrc)
Export ACE_ROOT =/home/wangj/ACE_wrappers
Export MPC_ROOT = $ ACE_ROOT/MCM
Export LD_LIBRARY_PATH = $ ACE_ROOT/lib:/usr/local/lib/sparcv9:/usr/openwin/lib:/usr/local/lib:
Export PATH =/usr/local/sbin:/usr/sbin: $ PATH: $ HOME/bin
Do not forget to enter source. cshrc after saving
Compile ACE:
1. Select the platform configuration file, the system should select the config-linux.h, in the $ ACE_ROOT/ace directory to create a config. h file, add a line in config. h
# Include "config-linux.h ".
2. Select the platform macro definition file. The system should select platform_linux.GNU and create a new file under the $ ACE_ROOT/include/makeinclude directory.
Platform_macros.GNU: add a line to platform_macros.GNU, as shown in the following figure: include
$ (ACE_ROOT)/include/makeinclude/platform_linux.GNU
3. Enter $ (ACE_ROOT)/ace/, enter the compilation command: make-f GNUmakefile, and start compiling libACE. so.5.6.0, libACE. so
Using ACE programming in Linux:
Let me write a simple Hello World! Program
1. Create a hello. cpp file:
# Include "ace/Log_Msg.h"
Int ACE_TMAIN (int argc, int argv [])
{
ACE_DEBUG (LM_DEBUG, ACE_TEXT ("Hello World! \ N ")));
Return 0;
}
2. Create the hello. nmfile:
Project (hello): aceexe {
Exename = hello
Source_Files {
Hello. cpp
}
Header_Files {
}
}
3. Create another executable file p (name can be retrieved by yourself)
$ ACE_ROOT/bin/mpc. pl-type make hello. mpc
4. After running p, generate Makefile. hello, run make-f Makefile. hello to generate the hello executable file.
5. Run:./hello
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service