Configuration and commissioning of C ++ network development kits ACE environment

xiaoxiao2021-03-06  41

ACE is a very useful open source C network programming development package, which uses it more conducive to code to have a robustness, portability, relatively simple than direct use of API. It is estimated that when everyone just contacted the ACE, they had a certain difficulty. I might gave up in halfway. This is the summary of I learn ACE two days. It is basically unwritten, but I want to study Ace, you will definitely understand the meaning below.

My system environment is: Win2k Pro (SP4), VC6.0 (SP5) After a while, I want to open the Forum on my homepage, set up the VC area, welcome everyone to exchange http://www.liufei.com 1, ACE Official Homepage: http://www.cs.wustl.edu/~schmidt/Ace.html Download Address: http://deuce.doc.wustl.edu/download.html I downloaded the ACE in the Latest Beta Kit. ZIP (Latest Release Compression Package seems to have problems, I have WinRAR3.30 decompressed report error) II. After decompression, put it on the D: / ACE_WrapPERS three, in the D: / ACE_WrapPers / ACE directory, new file config.h Join a line #include "ace / config-win32.h" four, compile: Open the D: /Ace_wrappers/ace/ace.dsw with VC6.0 Display Ace DLL CLASSES ACE LIB CLASSES or 1, from the menu to "Compile "," Place a long-range configuration ", select" Compilation "," Rebuild "(or any, such as Ace DLL - WIN32 MFC Debug) This process may last for half an hour or 2 From the menu, select "Compile", "Batch Build", and select the project you need. This process may last for two to four hours. LIB file is located in D: / ACE_WrapPers / ACE / under, the generated .dll file is located D: / ace_wrappers / bin / Under the same open ACE_STATIC.DSW Compile ACES.LIB Acup Acesd.lib ace_rmcasts.lib ace_rmcastsd.lib TMCasts.lib TMCastsd.Lib ACE generated DLL and LIB file naming: (d = debug, s = STATIC) Debug - Aced.lib, Debug Static - Acup, Release Static - ACE.LIB, Release Static - ACES.LIB 5, Sample Program Translation with VC to open D: /Ace_wrappers/tests/tests.dsw "Compile", "Batch Build", self-writer engineering: ACE programmer tutorial. Sample program in PDF: URL: http: / /www.cs.wustl.edu/~schmidt/ace_wrappers/docs/tutorials/guide-tutorials.html copies the original code on the page to a new file and name Server.cpp to open, compile, rebuild all by VC, compile, Pop-up dialog, "This Build Command Require ...", click "Yes" will appear if there is "Cannot Open include file: 'ace / suck_acceptor.h': no ​​such file or directory" project - set -c / C : Preprocessor, attached to the path:

D: / ACE_wrappers if "You must link against multi-threaded libraries when using ACE (check your project settings)" Engineering - Set -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 added in main return 0;" error LNK2001: unresolved external Symbol "__declspec (dllimport) INT __CDECL" Project - Set -Link-Input: Object / Library Module: Add Aced.lib Additional Library Path: D: / ACE_WrapPers / Ace Compile The problem encountered in the Client 1, Error C2039: 'Sprintf ': IS NOT A Member "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 / n?)); changed to "4, unable to find dynamic link library Aced.dll to the specified path to system variable PATH plus D: / ace_wrappers / bin static include: Engine - Set -C / C - Add in the handler definition, ACE_AS_STATIC_LIBS Example 1 Server.exe 16k Serverd.exe 97k Servers.exe 124k Serversd.exe 669k (Servers.ex is more suitable) CLIENT.EXE 16K Clientd.exe 97k Clients.exe 124k clientsd.exe 669k (Clients.exe is more suitable) Test Clients 127.0.0.1 1919 Servers 1919 Authors BLOG:

http://blog.9cbs.net/qiek/

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

New Post(0)