Install and use ACE (not an ace music format, but a web development kit)

Source: Internet
Author: User

What is ace?
Ace adaptive communication environment (Adaptive Communication Environment) is a free-to-use, open-source object-oriented (OO) framework ), many core modes for concurrent communication software are implemented. ACE provides a rich set of reusable C ++ wrapper facade and framework components to complete common communication software tasks across multiple platforms. It is estimated that the framework may be supported and used in the new C ++ builder.
Ace is intended for developers of high-performance and real-time communication services and applications. It simplifies the development of OO network applications and services that use inter-process communication, event Multi-Channel Separation, explicit dynamic links, and concurrency. In addition, through the dynamic link between the service and the application at runtime, ACE also automates the system configuration and reconfiguration.
Benefits of ACE
With the help of ACE components, it is easy to write concurrent network applications on an OS platform, and then quickly port them to a variety of other OS platforms. Ace's design uses a number of key patterns that improve software quality, including communication software flexibility, scalability, reusability, and adequacy. Ace is carefully designed to support a wide range of application Quality of Service (QoS) requirements, including low response waiting times for latency-sensitive applications, high performance of high-bandwidth applications, and real-time application predictability. Ace and Tao are designed to work together well to provide a comprehensive middleware solution, which is the development source code and standard implementation of CORBA.
Ace installation:
I have only installed functions in C ++ builder and have never used them in VC! But I want to be similar to CB. Under CB:
1. decompress the downloaded ace package to: C:/ace_warappers and create a Config under the C:/ace_warappers/ace directory. h file, add in the file: # include "ACE/config-win32.h"
(If it is installed under 98/Me, add # define ace_has_winnt4 0)
2. Open a DOS window and set the environment variables:
Set ace_root = C:/ace_wrappers
Set bcbver = 6
BCB 6.0 used by the author, so it is set to bcbver = 6
3. Enter C:/ace_wrappers/ace in the console
Type: Make-F makefile. if there is no error in compiling ace in Bor, you can use ACE in CB. Of course, you may not be able to find the corresponding DLL during compiling in CB. b. LIB can be added to the project.
4. Compile tests, not necessary: Enter: ace_root/Tests
Make-F makefile. Bor
If it succeeds, you can: run_tests.bat Bor to run the tests compiled by the network.

When using it, remember to set the corresponding header file path in option/directory of CB! Then you can add the header file to the project and use the ace library! You can also take a look at its examples. I believe that its cross-platform and high performance will attract you!
I won't have many licenses for installing vcpus. There is an ace_install.htm file in the ace's decompression Directory, which contains detailed instructions (for other operating systems and development platforms, you can refer to it). I believe it's hard for you!
Ace has been developing for many years. For example, few Chinese users know some excellent things ....

1. Ace official homepage: http://www.cs.wustl.edu /~ Schmidt/ace.html
: Http://deuce.doc.wustl.edu/Download.html

I downloaded ace.zip from latest beta kit (the compressed package in latest release seems to be faulty. I have an error in winrar3.30 decompression)

2. decompress the package and place it on disk D.
D: ace_wrappers

3. Add a new file config. H to the Directory D: ace_wrappersace.
# Include "ACE/config-win32.h"

4. Compile: Use vc6.0 to open D: ace_wrappersaceace.dsw
Ace DLL classes on the left
Ace lib classes
Or 1. Select "compile" from the menu, "place remote configuration", and select the project configuration you need.
"Compile" and "recreate all" (or any, such as Ace DLL-Win32 MFC Debug)
This process may last for half an hour to an hour.
Or 2. Select "compile" and "batch build" from the menu and select the project configuration you need.
This process may last two to four hours.

The generated. Lib file is located in D: ace_wrappersace,
The generated. dll file is located under D: ace_wrappersin.


Enable ace_static.dsw
Compile
Aces. Lib
Acesd. Lib
Ace_rmcasts.lib
Ace_rmcastsd.lib
Tmcasts. Lib
Tmcastsd. Lib

Naming rules for DLL and Lib files generated by ACE: (D = debug, S = static)

Debug-Aced. Lib, debug + static-acesd. Lib, release-Ace. Lib, release + static-Aces. Lib

V. Compile the sample program
Use VC to open D: ace_wrappers ESTs. DSW
"Compile" and "batch build"

6. Engineering configuration of Self-writing programs

Article 2: Example program in ACE programmer's Tutorial:
URL: http://www.cs.wustl.edu /~ Schmidt/ace_wrappers/docs/tutorials/guide-tutorials.html

Copy the original code on the webpage to a new file and name it server. cpp.
Open, compile, and recreate all with VC. In the pop-up dialog box, "This build command require...", Point "is"

The following error occurs:

If "cannot open include file: 'ace/sock_acceptor.h ': no such file or directory"
Project-set-C/C ++: Preprocessor and add the path D:/ace_wrappers.

If "you must link against multi-threaded libraries when using ACE (check your project settings )"
Project-set-C/C ++: code generation-use run-time Library: Debug multithreaded DLL

If "error c2065: 'ace _ error': Undeclared identifier" exists"
Error c2065: 'ace _ debug': Undeclared identifier
# Include "ACE/log_msg.h"

Error c4716: 'ace _ main_ I ': must return a value
Add in main
Return 0;

"Error lnk2001: unresolved external symbol" _ declspec (dllimport) int _ cdecl"
Project-settings-link-input: Object/Library module: Add aced. Lib additional library path: D: ace_wrappersace



Problems encountered during client Compilation
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 Yes? Change"

4. The specified path of the dynamic link library aced. dll cannot be found.
Add D: ace_wrappersin to the system variable path.



Static include:
Project-set-C/C ++-add to the pre-processing program definition, ace_as_static_libs


Example 1 server is generated after compilation
Server.exe 16 K serverd.exe 97 K servers.exe 124 K serversd.exe 669 K
(Servers.exe is suitable for publishing)

Example 2 generated after the client is compiled
Client.exe 16 K clientd.exe 97 K clients.exe 124 K clientsd.exe 669 K
(Clients.exe is suitable for publishing)

Test clients 127.0.0.1 1919
Server 1919

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.