Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation process under OpenDDS-Windows (VS2015)

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Need to prepare: Visual Studio, and install Windows SDK, but also need to install ActivePerl

My platform is VS2015 + OpenDDS-3.13.2

1.OpenDDS download:

Link: http://opendds.org/downloads.html

It is recommended to download the official document: http://download.objectcomputing.com/OpenDDS/OpenDDS-latest.pdf

If the document download speed is too slow, you can download Baidu online disk: https://pan.baidu.com/s/1fLYh2jA6B1rIAWNFOPtQ0Q

Add the root directory to the system environment variable:

DDS_ROOT = G:\ OpenDDS-3.13.2

2.Perl

OpenDDS is a cross-platform open source software, taking into account the needs of different users' platforms and development environments, using cross-platform language Perl as a scripting language. Download the ActiveState Perl version: https://www.activestate.com/products/activeperl/downloads/ on Perl website, and select the latest version to download. After the download is complete, install it directly.

After the installation is complete, cmd type perl-v to verify:

The above prompt indicates that the installation was successful.

3.ACE+TAO download:

Link: http://download.dre.vanderbilt.edu/

Just choose the one under Latest ACE+TAO Micro Release.

Extract the downloaded compressed file to the corresponding file directory, and then add the environment variable to the system:

ACE_ROOT: C:\ OpenDDS\ ACE_wrappers

TAO_ROOT: C:\ OpenDDS\ ACE_wrappers\ TAO

Then add the path to the environment variable Path:% ACE_ROOT%\ lib;%ACE_ROOT%\ bin

4. Compile ACE+TAO

When the ACE+TAO environment is configured, create a new file named config.h in the% ACE_ROOT%\ ace directory and add the following to the file: # include "ace/config-win32.h" for use in the win32 environment.

Go to the% ACE_ROOT% directory and the% ACEROOT%\ TAO directory, respectively, and use Visual Studio to open the ACE.sln and TAOACE.sln files that match the VS version. For example, VS2015 opens TAO_ACE_vs2015.sln. After entering, reset the solution goal: project-reset the solution goal, and then click OK, waiting for the automatic configuration to be completed.

Then compile the source code. There are two methods: the first is to select build-build solution directly in VS, and the second is to start the developer command line of VS, navigate to% ACE_ROOT%\ TAO, and compile with the following command:

Msbuild TAO_ACE_vs2015.sln / ppurs configuration Debugs / Platformers x64 / mpurs 2

Explain the parameters:

Configuration=Debug compiles on behalf of debug

Platform=x64 stands for forced compilation to 64-bit version, the reason: if you need to use Java for OpenDDS development, considering that most people are currently using 64-bit version of JDK, if you do not compile OpenDDS to 64-bit version, you cannot make JNI calls

/ CPU 2 represents the use of two threads to compile in parallel. In practice, it can save more than half of the time compared with a single thread. It is recommended to set it to the same number as your own.

It takes a long time, just wait for it to be finished.

5. Compile OpenDDS

Start the developer command line of VS, navigate to G:\ OpenDDS-3.13, enter the.\ configure command (you need to use.\ configure-- java if you want to enable java support), and wait for the command to finish executing

If prompted:

ERROR: Could not detect Visual C++ version, try running this script ". From the Visual Studio Command Prompt.Stopped

Please add the following to line 438 in the configure file (modified according to the version of vs I use, I use 2015, so write vs2015 or vc14):

$opts {'compiler_version'} = "vc14"

At this point, the program automatically generates the DDS.sln file and the setenv.cmd file, executes setenv.cmd to set the environment variables on the command line, then opens the newly generated sln file, retargetes the project, compiles the source code and waits for the operation to complete

6. test

OpenDDS comes with many instances, which are stored under% DDS_ROOT%\ examples and% DDS_ROOT%\ tests\ DCPS

Randomly pick a run inside the run_test.pl, can send and receive data normally.

Input instruction perl run_test.pl

It runs successfully, as shown in the following figure:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report