开始使用ACE工作
2007-06-04 20:29 flyingfish 阅读(3276) 评论(0) 编辑 收藏 举报几日来一直在看 马维达翻译的《ACE自适配通信环境中文技术文档》,终于看出点名堂决定从今日开始写代码调试工作工作系统的原型。虽说动作慢了点,不过连续阅读了《ACE文档》和Bruce Zhang的《软件设计精要与模式》多章,对设计模式有了更深刻的理解,相信对后边的工作应当助益不少吧。
工作先从编译ACE的源代码开始,在Visual Studio 2003下编辑步骤如下,关键操作为红色部分:
Building and Installing ACE on Windows with Microsoft Visual C++
- 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"
- The static, DLL and MFC library builds are kept in different workspaces. Files with names *_Static contain project files for static builds. Workspaces for static and DLL builds will be available through the stock release at DOC group's website. The workspaces for MFC are not available and have to be generated using MPC. Please see MPC's README for details.
- Now load the workspace file for ACE (ACE_ROOT/ACE.dsw).
- Make sure you are building the configuration (i.e, Debug/Release) 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. - If you are building for Windows NT 4 or later (Windows 2000, XP, etc.) then you can start building without anymore changes. If you are building on Windows 9x/Me, then you should add the line
#define ACE_HAS_WINNT4 0
- 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
- 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 CWinThread, make sure you spawn the thread with THR_USE_AFX flag set.#define ACE_HAS_MFC 1
ACE_USES_STATIC_MFC
in yourconfig.h
file. However, if you would like to link everything (including the MSVC run-time libraries) statically, you'll need to modify the project files in ACE yourself. - Static version of ACE libraries are built with
ACE_AS_STATIC_LIBS
#define ACE_NO_INLINE
- ACE DLL and LIB naming scheme:
More information for ACE/TAO on MSVC can be found here. The doxygen version of this document is available under Related Topics in the ACE Library.
关于VC版的INSTALL文档中没有提及,还不知道该如何把需要的lib,dll,.h完整的挑选出来。感觉ACE对于BCB的编译器支持较好,好多配置都是针对BCB的。
After searched the newsgroup at night,i believe that ACE for vc++ really not have the "install" option. like the post bellow: