Under Windows VC compilation Opendds

Source: Internet
Author: User

Opendds is a C + + open source implementation of the OMG organization DDS Standard, and Opendds also provides Java support. Opendds relies on the Ace Abstraction layer to provide compatibility with different platforms, and also relies on Tao (such as the IDL compiler for TAO). Currently Opendds has ociweb objectcomputing maintenance, the official website http://www.opendds.org/. Currently OPENDDS supported platforms are windows,linux Family,android,vxworks, etc., the available compilers include VC,GCC,QNX GCC, etc.

1. Opendds Compilation Preparation

Opendds relies on Tao (Tao relies on ace) as described above, and also relies on Perl. Perl's role in Opendds is 1. Run an automated test script or Opendds routine 2. The MPC relies on Perl to generate makefiles or VC project files. So the first step in compiling Opendds is to build a opendds-dependent environment: Compile tao+ace, and configure the Perl environment.

A. Tao+ace

Because Tao relies on Aces on aces, it is best to bundle download the Ace+tao release version. Ace+tao download website http://download.dre.vanderbilt.edu/, download the latest version of Ace+tao.zip. There are two versions of the site download available for both full and Sources versions, full refers to the version of the project file that has been generated (including the Gnumakefiles and VC project files), Sources only contains the source code, You need to generate makefile yourself using the MPC.

B. Perl

ActiveState Perl can be downloaded in the Windows environment.

C. Opendds

openddshttp://download.ociweb.com/opendds/.

2. Installing Perl

3. Compiling tao+ace

Compiling Tao+ace can refer to http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/TAO/TAO-INSTALL.html.

A. Unzip the ace+tao-6.2.6.zip, my decompression path is d:\.

B. Setting related environment variables

Ace_root set to the root directory of the zip decompression, my D:\ACE_wrappers;

Tao_root set to%ace_root%\tao, mine for D:\ACE_wrappers\TAO;

Path adds%ace_root%\lib and%ace_root%\bin.

C. Setting config.h

Create a new profile config.h under%ace_root%/ace, with the content of # include "Ace/config-win32.h".

D. Compiling

Open%ace_root%\ace.sln and%tao_root%\ace_tao.sln respectively, and then compile them in turn. The version of the VC that corresponds to the solution is known according to the solution file name.

Platform

File Name

VC7.1

Name_vc71

VC8 for Desktop/server

Name_vc8

VC8 for Windows Ce/mobile

Name_wince

VC9 for Desktop/server

Name_vc9

VC10 for Desktop/server

Name_vc10

VS2012

Name_vc11

You can also compile with the VS command-line tool. The compile commands for the debug version and release version are as follows:

MSBuild Ace_vc11.sln/p:configuration=debug >/p:configuration=release >/p:configuration= Debug >/p:configuration=release > Build_tao_debug.log

4. Compiling Opendds

A. Unzip the Opendds compressed file, my decompression path is d:\

B. Setting related environment variables

Set%dds_root% to Opendds after decompression root directory, my for D:\DDS;

Path adds% dds_root%\lib and% dds_root%\bin.

C. Compiling Opendds

Open DDS.sln to compile. The file name corresponds to the compiler version in the same way as Tao.

Note:opendds does not provide a VS2012 version of the project file, so when you open a solution file using VS2012 or a later IDE, you need to update the solution and project files. However, in the update process may be error, I encountered is the pre include path into garbled error, need to update again. Of course, the best way is to compile directly with the corresponding version.

You can use the VS command-line tool to compile. The command is as follows:

MSBuild Dds_vc10.sln/p:configuration=debug > Build_dds_debug.logMSBuild dds_vc10.sln/p: Configuration=release > Build_dds_debug.log

5. Run the test script

After the compilation is complete, you can run a test script to see if the OPENDDS environment has been successfully built. Switch to D:\DDS\EXAMPLES\DCPS\MESSENGER_IMR directory and run run_test.pl

d:\dds\examples\dcps\messenger_imr>.\run_test.pl > Test.log

Test.log content is as follows:

>>> D:\ACE_wrappers\TAO\orbsvcs\ImplRepo_Service\.\tao_imr_locator. Exe-o Imr.ior-orbendpoint iiop://:15021>>> D:\ACE_wrappers\TAO\orbsvcs\ImplRepo_Service\.\tao_imr_ Activator. Exe-o activator.ior-orbinitref implreposervice=file://imr.ior-orbendpoint iiop://:14908>>> D:\DDS\bin\.\ Dcpsinforepo.exe-nobits-o REPO.IOR-ORBUSEIMR 1-orbinitref implreposervice=file://Imr.ior>>> D:\ACE_WRAPPERS\BIN\TAO_IMR. Exe-orbinitref implreposervice=file://imr.ior shutdown Inforepo>>> D:\ACE_WRAPPERS\BIN\TAO_IMR. Exe-orbinitref implreposervice=file://imr.ior Update Inforepo-l wjy-c"D:\DDS\bin\.\DCPSInfoRepo.EXE-NOBITS-o repo.ior-orbuseimr 1-orbinitref implreposervice=file://imr.ior">>> D:\ACE_WRAPPERS\BIN\TAO_IMR. Exe-orbinitref Implreposervice=file://imr.ior List-V.\.\publisher. EXE-dcpsconfigfile Pub.ini-orbendpoint iiop://:16309. \.\subscriber. EXE-dcpsconfigfile Sub.iniMessage:subject=Review subject_id= 99 from=Comic Book Guy Count= 0text=worst. Movie. Ever.SampleInfo.sample_rank= 0Message:subject=Review subject_id= 99 from=Comic Book Guy Count= 1text=worst. Movie. Ever.SampleInfo.sample_rank= 0Message:subject=Review subject_id= 99 from=Comic Book Guy Count= 2text=worst. Movie. Ever.SampleInfo.sample_rank= 0Message:subject=Review subject_id= 99 from=Comic Book Guy Count= 3text=worst. Movie. Ever.SampleInfo.sample_rank= 0Message:subject=Review subject_id= 99 from=Comic Book Guy Count= 4text=worst. Movie. Ever.SampleInfo.sample_rank= 0Message:subject=Review subject_id= 99 from=Comic Book Guy Count= 5text=worst. Movie. Ever.SampleInfo.sample_rank= 0Message:subject=Review subject_id= 99 from=Comic Book Guy Count= 6text=worst. Movie. Ever.SampleInfo.sample_rank= 0Message:subject=Review subject_id= 99 from=Comic Book Guy Count= 7text=worst. Movie. Ever.SampleInfo.sample_rank= 0Message:subject=Review subject_id= 99 from=Comic Book Guy Count= 8text=worst. Movie. Ever.SampleInfo.sample_rank= 0Message:subject=Review subject_id= 99 from=Comic Book Guy Count= 9text=worst. Movie. Ever.SampleInfo.sample_rank= 0>>> D:\ACE_wrappers\bin\tao_imr. Exe-orbinitref implreposervice=file://imr.ior shutdown inforepotest PASSED.

Test passed.

Reference article:

The process of compiling opendds using VC under Windows

Http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#win32

Http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/TAO/TAO-INSTALL.html

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.