VC6下配置ACE的详细过程
自己作一个config.h 里面要有
#include "ace/config-win32.h"
如果是win98/me的话再加上
#define ACE_HAS_WINNT4 0
然后打开ace.dsw,进行批生成(可以选择生成的库,比如(static)debug/release等,实在不行你就全生成得了)。之后会在ace目录下生成所需的.dll和.lib。
再设置一下编译环境就好了。
这是详细的介绍,在ACE_INSTALL.html里:
Building and Installing ACE on Windows with Microsoft Visual C++
Note concerning MSVC 5.0 and Service Pack 3: There has been confusion regarding MSVC 5 and its Service Pack 3. Some ACE users have, in the past, had problems with SP3 that were not present in SP2. Thanks to the diligent efforts of Bill Fulton, the mystery appears to be solved. The key? (Oh, this is a good one...) It would appear that there are actually multiple versions of SP3 in existence. The earlier ones have the bug, while later ones have it fixed. The service pack downloadable from Microsoft's
web site as of June 16, 1998 works fine. The CD containing SP3, if it has part number X03-50158 on the disc (the part number on the jacket is probably different), also works fine. Note, however, that regardless of the version of SP3, there are some STL bugs in SP3 which you should get corrected. Please see dinkumware/vc_fixes.html for details. Thank you to Ben Eng for the pointer to the STL fixes.
Right now there is a SP4 (and hopefully only one of them) which fixes a deadlock problem in the STL.
We no longer actively support MSVC++ 5.x or earlier. ACE might work with these compilers but probably not without a bit of effort.
Uncompress the ACE distribution into a directory, where it will create a ACE_wrappers directory containing the distribution. The ACE_wrappers directory will be referred to as ACE_ROOT in the following steps -- so ACE_ROOT\ace would be C:\ACE_wrappers\ace if you uncompressed into the root directory.
Create a file called config.h in the ACE_ROOT\ace directory that contains:
#include "ace/config-win32.h"
Now load the workspace file for ACE (ACE_ROOT\ace\ace.dsw).
Each project will contain several different configurations. These are a mixture of Debug/Release, MFC/Non-MFC, and Static/Dynamic library versions. Make sure you are building the one you'll use (for example, the debug tests need the debug version of ACE, and so on). All these different configurations are provided for your convenience. You can either adopt the scheme to build your applications with different configurations, or use ace/config.h to tweak with the default settings on NT.
Note: If you use the dynamic libraries, make sure you include ACE_ROOT\lib in your PATH whenever you run programs that uses ACE. Otherwise you may experience problems finding ace.dll or aced.dll.
If you are building for Windows NT 4 or later (Windows 2000, XP, etc.) then you can start building without anymore changes. If yo
u are building on Windows 9x/Me, then you should add the line
#define ACE_HAS_WINNT4 0
before the #include statement in ACE_ROOT\ace\config.h and it will turn off some WinNT/Win2K-specific code in ACE.
If you want to use the standard C++ headers (iostream, cstdio, ... as defined by the C++ Standard Draft 2) that comes with MSVC, then add the line:
#define ACE_HAS_STANDARD_CPP_LIBRARY 1
before the #include statement in ACE_ROOT\ace\config.h.
To use ACE with MFC libraries, also add the following to your config.h file. Notice that if you want to spawn a new thread with CWinThr