Install ACE

xiaoxiao2021-03-06  59

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, its content is: #include "ace / config-win32.h"

3. Load the project file (ACE_ROOT / ACE / ACE.DSW) in VC

4. Each project will contain multiple configurations, which are the mixing of options such as debug / release, mfc / non-mfch, and STATIC / DYNAMIC library version. 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 1

7. If you need to use with the MFC, add the following definition to your config.h file, pay attention, if you want to use a new thread using the spawn, you must ensure that the THR_USE_AFX flag is used to spawn threads. #DEFINE ACE_HAS_MFC 1

?? Note: I can't pass when I use this macro compilation ACE. I have known friends to enlighten it.

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.

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.

Integrate ACE with VC6

1. Open Tools> Options> Directories Add to: Executable File: C: / ACE_WrapPERS / BININCLUDE FILE: C: / ACE_WRAPPERS /

Library Files: C: / ACE_WrapPERS / ACE

Source Files: C: / ACE_WrapPERS /

II. Join C: / ACE_WrapPERS / BIN to System Environment Variable PATH

When used in the MFC program, you should add: InitInstance ():

WSData WSData; Word VerRequested = MakeWord (2, 2);

WSASTARUP (VERREQUESTED, & WSDATA)

?

转载请注明原文地址:https://www.9cbs.com/read-117262.html

New Post(0)