[rti_connext_dds-5.2.0-core-src]howto build nddsgen1.0 and nddsgen2.0

4 posts / 0 new
Last post
Offline
Last seen: 8 years 3 months ago
Joined: 12/14/2015
Posts: 2
[rti_connext_dds-5.2.0-core-src]howto build nddsgen1.0 and nddsgen2.0

Hi everyone.

i compiled rti_connext_dds-5.2.0-core-src.zip using premake-ndds.lua (from this community). but that lua file not include build script of nddsgen.1.0 and nddsgen.2.0

pls anyone kindly let me know howto make makefile of that?

and if i make hello sample project howto to that? (if i success nddsgen, that is possible?)


thank you in advance.

Jone.

 

Fernando Garcia's picture
Offline
Last seen: 4 months 6 days ago
Joined: 05/18/2011
Posts: 199

Hi Jone,

rti_connext_dds-5.2.0-core-src.zip does not include the source code of nddsgen.1.0 and nddsgen.2.0. If you examine the content of those modules, you will only find a precompiled JAR file under and nddsgen.1.0/class nddsgen.2.0/class. These JAR files are exactly the same ones you can find in the regular RTI Connext DDS installation.

Fernando.

Offline
Last seen: 8 years 3 months ago
Joined: 12/14/2015
Posts: 2

Hi Fernando.

thank you for help. but i also met the error message like belows when i run ./rtiddsgen .

i'm using ubuntu 14.04 and i setted JREHOME="/usr/lib/jvm/default-java" at the /etc/environment file.
did you some information about that?

/prj/rti/ndds520-src/nddsgen.1.0/scripts$./rtiddsgen

/prj/rti/ndds520-src/nddsgen.1.0/scripts/../lib/: no such file or directory

/prj/rti/ndds520-src/nddsgen.1.0/scripts/../lib/: no such file or directory

/prj/rti/ndds520-src/nddsgen.1.0/scripts/../lib/: no such file or directory

...

Warning: OS Linux may not be supported. Be sure JREHOME is set.

Jone.

Fernando Garcia's picture
Offline
Last seen: 4 months 6 days ago
Joined: 05/18/2011
Posts: 199

Hi Jone,

The script that runs nddsgen.1.0 and nddsgen.2.0 is tightly coupled to the regular installation of RTI Connext DDS. I think you should probably use your own script to run rtiddsgen, bellow you will find a simple script you could use. Also, I would recommend you to use nddsgen.2.0. Note that nddsgen.1.0 is around just moslty for Corba compability, which you are probably not going to be using.

Here the script you could use to run nddsgen.2.0:

#!/bin/sh

filename=$0
script_dir=`cd "\`dirname "$filename"\`"; pwd`
java_exec=`which java`
NDDSHOME=;export NDDSHOME

if [ ! -x "$java_exec" ]
then
    echo "Error: Cannot find 'java' command in your PATH"
fi

"$java_exec" \
    -DNDDS_RESOURCE_DIR="${script_dir}/../resource/rtiddsgen" \
    -DNDDSHOME="$NDDSHOME" \
    -classpath "${script_dir}/../class" \
    -jar "${script_dir}/../class/rtiddsgen2.jar" \
    "$@"

Please, let me know if it works for you.

Thanks,
Fernando.