Building and installing ACE on MinGW uses a mix of a UNIX building process and Win32 configuration files.
For our build we require the packages MinGW and MSYS.
Install the MinGW tools into a common directory, say c:/MinGW.
Install the MSYS tools into a common directory, say c:/msys.
Open a MSYS shell. Set your PATH environment variable so your MinGW's bin directory is first:
export PATH=/c/MinGW/bin:$PATH
Add an ACE_ROOT environment variable pointing to the root of your ACE wrappers source tree:
export ACE_ROOT=/c/ACE_wrappers
From now on, we will refer to the root directory of the ACE source tree as $ACE_ROOT.
Create a file called config.h in the $ACE_ROOT/ace directory that contains:
#include "ace/config-win32.h"
Create a file called platform_macros.GNU in the $ACE_ROOT/include/makeinclude directory containing:
include $(ACE_ROOT)/include/makeinclude/platform_mingw32.GNU
In the above text, don't replace $(ACE_ROOT) with the actual directory, GNU make will take the value from
the environment variable you defined previously. If you lack Winsock 2, add the line
winsock2 = 0
before the previous one.
In the MSYS shell, change to the $ACE_ROOT/ace directory and run make:
cd $ACE_ROOT/ace
make
or
cd $ACE_ROOT
make all
This should create libACE.dll (the Win32 shared library) and libACE.dll.a (the Win32 import library for the DLL).
Note that the name for the ACE DLL follows the MinGW convention, which itself resembles UNIX.
If you want static libs also, you may run:
make static_libs=1
The same rules for Win32 search of DLLs apply for MinGW. If you want to run some ACE programs from the MSYS shell,
you may need to add the directory for libACE.dll to your PATH:
export PATH=/c/ACE_wrappers/ace:$PATH
ACE TESTS
The tests are located in $ACE_ROOT/tests. After building the library, you can change to that directory and run make:
cd $ACE_ROOT/tests
make
Once you build all the tests, you can run run_tests.pl in the tests directory to try all the tests:
perl run_test.pl
If you are using ACE as a DLL, you will need to modify your PATH variable as explained above.
You may want to check $ACE_ROOT/tests/README for the status of the various tests on MinGW and the different Windows flavors.
阅读(1464) | 评论(0) | 转发(0) |