Be a config.h, there is a #include "ace / config-win32.h" if it is Win98 / me, plus #define ace_has_winnt4 0
Then open the Ace.dsw, and make a batch (you can choose the generated library, such as "static) debug / release, etc., you can't get it all.). The desired .dll and .lib will be generated in the ACE directory. It is good to set up the compilation environment. This is a detailed introduction, in 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 http://www.dinkumware.com/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) 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 the dynamic libraries, makess in your path. OtherWise You May Experience Problems Finding ace.dll or acid.dll.
If you are building for Windows NT 4 or Later (Windows 2000, XP, ETC.) THEN You Changes. If you are building on window 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 CWinThread, make sure you spawn the Thread with thr_use_afx flag set.
#DEFINE ACE_HAS_MFC 1
By default, all of the ACE projects use the DLL versions of the MSVC run-time libraries. You can still choose use the static (LIB) versions of ACE libraries regardless of run-time libraries. The reason we chose to link only the dynamic run-time library is that almost every NT box has these library installed and to save disk space. If you prefer to link MFC as a static library into ACE, you can do this by defining ACE_USES_STATIC_MFC in your config.h file. However, if You would like to link everything (including the msvc run-time libraries) staticly, you'll NEED to MODIFY The Project Files in Aceelf.
Static Version of Ace Libraries Are Build with ace_as_static_libsdefined. This Macro Should Also BE Used in Application Projects That Link to Static Ace Libraries
Optionally You Can Also Add The Line
#define ace_no_inline
Before the #include statement in ace_root / ace / config.h to disable inline function and reduce the size of static libraries (and your executables).
ACE DLL AND LIB Naming Scheme:
WE Use the Following Rules To Name The DLL AND LIB FILES IN ACE WHEN Using MSVC.
"Library / DLL Name" (Is Static Library? ":" ") (Is debugging enable?" D ":" ") {" .dll "|" ".lib"}
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. Download the latest ACE RELEASE version of the compressed package, the directory is: ACE- version number / ACE_WRAPPERS / 2. Loading Project File, Directory: ACE_WrapPERS / ACE / ACE.DSW3. New config.h file to the ACE_WrapPers / ACE directory 4. Add include header file declaration: #include "ace / config-win32.h" 5. Add macro definition (Note: Before #include) (1). # Define a_has_winnt4 0 // OS is not NT4.0 or later version (2). # Define ace_has_standard_cpp_library 1 // Using standard C libraries (3). # Define ACE_HAS_MFC 1 // Use the MFC library (4). # Define thr_use_afx 1 // Generate new thread class (5) using CWINTHREAD. # Define ace_uses_static_mfc 1 // Static Connect MFC library (6). # Define ace_as_static_libs 1 // Generate Static ACE library (7). # Define ace_no_inline // Do you use the inline function in a static library 6. Compile it .Lib and .dll file seem to have a problem in use, I don't know if you have encountered: 1. When using the ACE to release the Release version program, TryEntercriticalSection caused a problem that cannot be compiled
Solution: (1). Project -> Setting -> C / C Write: _win32_winnt = 0x0500 (2). Include the header file as: Windows.h If there is "Cannot Open include file: 'ACE / SOCK_ACCEPTOR. H ': No Such File or Directory - Set -C / C : Preprocessor, additional included path: D: / ace_wrappers If there is "You Must Link Against Multi-Threaded Libraries When Using Ace (Check Your Project Settings" project - provided -C / C : Code Generation - Use run-time library: Debug Multithreaded Dll if "error C2065: 'ACE_ERROR': undeclared identifier" error C2065: 'ACE_DEBUG': undeclared identifier #include "ace / Log_Msg.h"
Error C4716: 'ACE_MAIN_I': Must Return A Value Add Return 0 in Main; "Error LNK2001: Unresolved External Symbol" __DECLSPEC (DLLIMPORT) INT __CDECL "Project - Set -Link-Input: Object / Library Module: Add Aced.lib Additional Location Path: D: / ACE_WrapPERS / ACE Compile The problem encountered in the Client 1, Error C2039: 'Sprintf': is not a member of 'ace_os' #include "ace / os_ns_stdio.h" 2, Error C2039:' Strlen ': is not a member of' ace_os' #include "ace / os_ns_string.h" 3, Error C2059: SYNTAX ERROR: '?' error in this sentence: ACE_DEBUG ((lm_debug,? usage egx
In general, the examples inside are needed to include #include "ace / os.h" #include "ace / log_msg.h" if there is nothing in the program, then add it. The program entrance is wrong. Add a #include "ace / os_main.h" to generate and install ACE on the Win32 platform using Microsoft Visual C : Note: There are some problems with MSVC5.0 and Service Pack 3, some users in SP2 The use of good code in SP3 is caused by some problems. Thanks to Bill's careful lookup, this mysterious problem is solved. answer? (Oh, there is a good answer here ...) This may be because there are multiple versions of SP3 earlier versions of SP3 have some bugs, and later version fixes these errors, from the Microsoft website, June 1998 The 16th version of SP3 is a good version. If X03-50158 is part of the CD serial number with SP3, then these versions are also good. But regardless of any version of SP3, the implementation of its STL has errors. For details, please visit http://www.dinkumware.com/vc_fixes.html. Thank Ben EG to fix these errors. The current SP4 (I hope only one version) has been fixed to the deadlock problem in STL. We will now no longer actively support MSVC 4.x and previous versions, ACE can work with these compilers but may lose some benefits. 1. Complicate the ACE package bound into a directory, which will generate a directory ACE_WrapPERS containing the ACE in that directory. In the next step, it is assumed that the ACE distribution package is decompressed into the 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, which is: #include "ace / config-win32.h" 3. Load the ACE in VC (ACE_ROOT / ACE / ACE. DSW) 4. Each project will contain multiple configurations, which are mixed with the options such as debug / release, mfc / non-mfch, and Static / Dynamic library versions. Determine what you need (for example, debug code requires a debug version of the ACE). All of these different configurations can provide some convenience, you can or use different modes to construct applications of different configurations, or change the different configurations on NT by changing the ACE / Config.H. Note: If you use a dynamic connection, ensure that the ACE_ROOT / BIN is added to your PATH environment variable, otherwise you will encounter the problem that you are looking for Ace.dll or Aced.dll when running the program. 5. If you build ACE on Windows NT or Windows 2k, you can start building her immediately without any changes, if you build on Windows 9x / me, then you must be in ACE_ROOT / ACE / Config.h. # Add a line before the include block: #define ace_has_winnt4 0 This will remove some Winnt / Win2k special code in the ACE.
6. If you want to use the standard C header file (C Standard Draft Draft Draft Draft ", you should add a line before the #include block of ACE_ROOT / ACE / CONFIG.H. Define ACE_HAS_STANDARD_CPP_LIBRARY 17. If you need to use with the MFC, add the following definition to your config.h file, note that if you want to use a new thread, you must guarantee the SPAWN thread using the THR_USE_AFX flag. #define ace_has_mfc 1 default, ACE project uses the dynamic DLL version of the MSVC runtime, you can also choose the Static (LiB) version of the ACE's uncomfortable runtime library. We choose to use only the reason for the Dynamic Runtime Library connection that these libraries are installed on all NT machines, and we can reduce the size of the code. If you want the ACE to connect to the static version of the MFC, you can define ace_uses_static_mfc in config.h. However, if you want a static connection to all libraries (including MSVC runtime libraries), you need to modify the project file yourself. 8. If you want to build a static version of the ACE, you need to define ACE_AS_STATIC_LIBs in config.h, which must also be defined in those applications that wish to use the ACE. As an option, you can add a row before #include statement in ace_root / ace / config.h. #DEfine ace_no_inline to cancel the inline linkage to reduce the size of the static library (and your run code). 9. Naming Rules for ACE DLL and LIB libraries: We use the following rules to clearly use the MSVC's ACE DLL and LIB files. "Library / DLL NAME" (Is a static library? "S": "") (including debugging information? "D": ") {" .dll "|" .lib "} is used in the MSVC environment More information of ACE can be found here. First, install TAO, you need to compile and install the ACE. Second, the compilation and installation steps of ACE see http://www.cs.wustl.edu/~ SchmidtAce_WrapPers/ace-install.html. TAO's compilation and installation steps see http://www.cs.wustl.edu/~schmidt/Ace_wrappers/tao-install.html. If your English is ok, it is best to read these two documents directly. In the end, the Chinese document is just "megadownload megadownload megadownload megadownload megadownload megadownload megadownload megadownload megadownload megadownload megadownload]. But I still compile some of these paragraphs (VC 6.0 ACE-5.2.1 TAO-1.2.1): ACE Compilation and Install Many Features Many of the General Rules ACE can pass in $ ACE_ROOT / ACE / Config.h Some macros are defined in the modification. These macros should always appear before they include configuration files for your platform. However, if you want to cancel / redefine the macro defined in the configuration file for a specific platform, # Undef should appear after the configuration file. If you plan to compile Ace on a variety of platforms, you may need to consider cloning the source tree. Steps: 1. Unzip the ACE publish file into a directory where you will create the ACE_WrapPers directory containing all files. In the following steps, the ACE_WRAPPERS directory will be alleged as ACE_ROOT.
2. Create a file called config.h in the ACE_ROOT / ACE directory, including: #include "ace / config-win32.h" 3. Now load ACE project file (ACE_ROOT / ACE / ACE.DSW) . 4. Each of these projects contains several different configurations (mixed DEBUG / Release, MFC / Non-MFC, Static / Dynamic Library version). You can choose the configuration you need, or use ACE / Config.h to adjust. Note: If you use a dynamic link library, determine the ACE_ROOT / BIN in PATH when running using the ACE. 5. If your system platform is Winnt or 2000, you can start compiling without any changes. If you are Windows 9x / ME, you need to add: #DEfine ace_has_winnt4 06. If you want to use the MSVC standard C head (iostream, cstdio ...), in ACE_ROOT / The #include statement in ACE / config.h Add: #define ace_has_standard_cpp_library 17. To use ACE with the MFC, add the following definition: #define ace_has_mfc 1 Note If you want to derive new threads through Cwinthread, be sure to set thr_use_afx . By default, all ACE projects use DLL versions of MSVC runtime libraries. Despite this, you can still choose to use the Static (LIB) version of the ACE library. If you want to connect the MFC as a static library link into the ACE, you can define ace_uses_static_mfc in the config.h file. But if you want a static link all things (including MSVC Runtime Library), you need to modify the ACE project file. 8. The static version of the ACE is compiled by defining ace_as_static_libs. This macro should also be used in the application project of the link static ACE library. You can also add #define ace_no_inline to the config.h file to cancel the inline and reduce the size of the static library (and your executable). 9. Naming Scheme of ACE DLL and LIB: "Library / DLL Name" (Is a static library? "S": ") (whether debugging is enabled?" D ":" ") {" .dll " ".lib"} 10. Compiled after the configuration is completed. Select a DLL version, compile the generated DLL file in the ACE_ROOT / BIN, the corresponding lib file is in the ACE_ROOT / ACE. ACE Tests each test program in ACE_ROOT / TESTS. There is also a workspace file available to compile all the test programs (Tests.dsw). Once you compile all the test programs (you can use batch compilation), you can run Perl script run_test.pl or batch file run_tests.bat in the Tests directory for all tests. Tao's compilation and installation determines the Cl.exe of the VC on your access path. Set the ACE_ROOT or TAO_ROOT environment variable. For example: set ace_root = C: / ACE_WrapPerstao is preferably placed in ACE_WrapPers (which is also the default). 1. Determine the ACE has been compiled and installed.