WINDOW10 (64bit) +vs2010 compiling Ace_tao source repository

Source: Internet
Author: User

1. Download

ace+tao:http://download.dre.vanderbilt.edu/previous_versions/

Vs2010:https://pan.baidu.com/mbox/homepage?short=c1z61lm

The latest version of 6.4.3 is compiled with vs2012 and above, and the version of Ace_tao described in this article is 6.2.6, which is 10 or 11 for the build version. In addition, download the source library is best not with the src suffix, sources-only package contains only the source code, you must use the MPC to generate their own makefile.

Different platform installation process in http://www.dre.vanderbilt.edu/~schmidt/ACE-install.html are introduced, want to know can go to see.

2. Unzip

Extract to the specified directory, such as D:\ACE_TAO_6.2.6\ACE_wrappers, the file path is best not with Chinese characters

3. Bad environment variable setting

Adding system variables

ace_root:d:\ace_tao_6.2.6\ace_wrappers; Tao_root:d:\ace_tao_6.2.6\ace_wrappers\tao;

4. Compiling Aces

1). Create a Config.h file under the Extract directory \ace_wrappers\ace, with the content: #include "ace/config-win32.h"

Specific macro definitions add meaning here is not explained in detail, at present I use these

#ifndef __ace_config_h
#define __ace_config_h

#define Ace_has_standard_cpp_library 1
#define Ace_disable_win32_error_windows
#define Ace_disable_win32_increase_priority
#define Ace_no_inline
#define ACE_HAS_MFC 1
#include "Ace/config-win32.h"

#endif/* __ace_config_h */

2). Open D:\ACE_TAO_6.2.6\ACE_wrappers\TAO\ Tao_ace_vc10.sln with VS2010, set ACE as Startup item, right-click property:

A) VC + + Directory--Include directory add $ (ace_root)

b) VC + + Directory--Library directory add $ (ace_root) \lib

3). Build the solution

4). After the successful compilation of the file in the Ace_wrappers\lib directory (recommended Debug and release version are generated)

Using Aces in 5.VS projects

Right-click Project properties, configuring

VC + + directories-->include directories D:\ACE_TAO_6.2.6\ACE_wrappers

VC + + directories-->library directories D:\ACE_TAO_6.2.6\ACE_wrappers\lib

c/c++-->general--> Additional Include Directories D:\ACE_TAO_6.2.6\ACE_wrappers\TAO

Linker-->general-->additional libraray Directories D:\ACE_TAO_6.2.6\ACE_wrappers\lib

Linker-->general-->additional Dependencies TAOd.lib ACEd.lib

Here are the simple code tests and the results:

#include "stdafx.h"
#include <iostream>
#include <tao/corba.h>
#include <tao/String_Alloc.h>
using namespace Std;
#include "stdafx.h"

int ace_tmain (int argc, Ace_tchar *argv[])
{
Char *p = Corba::string_alloc (5);
strcpy (P, "Hello");
cout<<p<<endl;
Corba::string_free (P);
Corba::string_var s = corba::string_dup ("World");
Cout<<s.in () <<endl;
cout<<p<<endl;
GetChar ();
return 0;
}

Reference: http://blog.csdn.net/kaci_csdn/article/details/52535589

WINDOW10 (64bit) +vs2010 compiling Ace_tao source repository

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.