[]VS2008 compiler under ACE configuration

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

About VS2008 learning method of ACE configuration, the VS2008 installation is no need to say.

1,ACE Download

The latest version here:

Too many versions, you can select http://download.dre.vanderbilt.edu/previous_versions/ACE-6.0.0.zip or http://download.dre.vanderbilt.edu/previous_versions/ACE-6.0.0.tar.gz, both of which may be only format on the different, specific not verified, but can be used.

2,The ACE compiler

Will be downloaded to the compressed file decompression to the root directory of C, of course, the other disk other directories can also, path allocation right.

Path after decompression for C:/ACE_wrappers, you can see the C:/ACE_wrappers directory under the SLN file only 8,9 and 10 versions of the three, the 9 is open in VS2008, 10 is VS2010. Create a config.h file, the three lines below the paste into, put in the C:/ACE_wrappers/ace directory


//#define ACE_HAS_MFC 1(This sentence should be off, or will have a memory leak)

#include "ace/config-win32.h"

Then open the C:/ACE_wrappers/ace/ace_vc9.sln, generating (B) — — > ACE (U), the compiler needs a period of time. Look at the directory compiled after completion of the C:/ACE_wrappers/lib, ACEd.dll and ACEd.lib files, it is the two.

3,To set environment variables

My computer is — — > — > &mdash property; Advanced tab — — > Environmental Variables button, the new variables, user group variable name: ACE_ROOT, variable value: C:/ACE_wrappers; editing variables Path, add: %ACE_ROOT%/bin;%ACE_ROOT%/lib.

4,The VS2008 configuration

Selection tool (Tools) — — > option (Options) — — > project and solution (Projects and Solutions) — — > VC++ directory(VC++ Directories)

Executable file (Executable files): add$(ACE_ROOT)/bin

Include file (Include files): add$(ACE_ROOT)

Library file (Library files): add$(ACE_ROOT)/lib

5,The configuration is complete, test

Open the VS2008 VC++ Win32, create a Win32 console application test, the next step, additional options to choose empty project, completed.

The solution explorer tab, source files directory the right mouse button, add (D) — — > new item (W)..., select the C++ file (.Cpp) to create a.Cpp file, paste the following code:

#include "ace/Log_Msg.h" int main (int argc, char *argv[]){ ACE_TRACE(ACE_TEXT ("main")); ACE_DEBUG ((LM_INFO, ACE_TEXT ("Hello/n")));

getchar(); return 0; }

Also a test project, right mouse button menu, adding (D) — — > existing item (G) to the C:/ACE_wrappers/lib folder..., select select ACEd.lib file, add.

Well, F5 start debugging, black background window (like TC compile time type), Hello

Configure the correct´╝ü

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Elmer at November 19, 2013 - 7:27 AM