Jump to content


Photo

Using an IDE to develop OpenSplice DDS applications


  • Please log in to reply
10 replies to this topic

#1 Francois

Francois

    Member

  • Members
  • PipPip
  • 15 posts

Posted 09 July 2010 - 01:50 AM

Hello,

I have written pretty simple DDS applications when I wanted to know how OpenSplice works, and up to now I've always compiled my code by modifying the Makefile that is provided with the examples.

But what I would need to do now is to integrate the DDS functionalities with an already existing code that is edited, compiled and linked with Eclipse.

The C++ project executes fine when it is run within Eclipse. To integrate DDS with my project I do the following steps:

1. I include all the paths for the header files through the properties of the project.
2. I also include the library paths of lib and custom_libs in the properties section of the project.


When I compile the project there are a lot of compiling errors like:

"Boolean" does not name a type in SACCP_CORBA.h
"Boolean in namespace CORBA does not name a type

I think there are many libraries and files to include before we can compile this project properly, but we've browsed all the OpenSplice package to add everything we found. Could you tell us what header files or libraries we need to add and their path?

I realise that this is not a question related to OpenSplice specifically and I apologies, but I guess you already have encountered this issue of integrating OpenSplice with an existing application before, so I was wondering if you know some people who used OpenSplice with Eclipse? Or,from your own experience, if you think that there is a better way to proceed with this integration phase.

Thank you for your help!

Francois

#2 Francois

Francois

    Member

  • Members
  • PipPip
  • 15 posts

Posted 16 July 2010 - 07:50 AM

Nevermind, we made it work, some additional settings needed to be done. It compiles properly, we still have an issue when we run it though, but I'll do another post in the Troubleshooting section.

If anyone wants to use Eclipse to code DDS applications I can explain the different steps to set it up.

#3 Tim Wells

Tim Wells

    Member

  • Members
  • Pip
  • 4 posts

Posted 21 July 2010 - 01:10 PM

Francos,

I'm not quite there yet but will eventually be using the eclipse ide for development. I would appreciate it if you could share what you have learned about developing with OpenSplice on eclipse.

Thank you,

tim

#4 Francois

Francois

    Member

  • Members
  • PipPip
  • 15 posts

Posted 29 July 2010 - 09:06 PM

Hi Tim,

using eclipse to code DDS applications requires basically 2 steps. Here is what I did with eclipse for C++ on my linux machine:

1. Include the headers: in the properties of your project add all the headers you need that you can find in the include folder of your OpenSplice home directory. (properties / C/C++ General / Paths and Symbols / Includes tab / GNU C++ / Add ....)

2. Add all the libraries: properties / C/C++ Build / Settings / Tool Settings tab / GCC C++ Linker / Libraries. I added all these libraries:

-ddsserialization
-ddskernel
-ddsutil
-ddsdatabase
-ddsuser
-ddsconf
-ddsconfparser
-dcpsgapi
-dcpssacpp
-ddsos

you don't need to specify the paths if you copy all the libraries in your usr/lib directory.

And that's about it! I also included the CheckStatus.h in the headers and the .cpp in the source since I always use the checkHandle and checkStatus functions.

Francois

#5 Tim Wells

Tim Wells

    Member

  • Members
  • Pip
  • 4 posts

Posted 30 July 2010 - 11:02 AM

Hi Tim,

using eclipse to code DDS applications requires basically 2 steps. Here is what I did with eclipse for C++ on my linux machine:

1. Include the headers: in the properties of your project add all the headers you need that you can find in the include folder of your OpenSplice home directory. (properties / C/C++ General / Paths and Symbols / Includes tab / GNU C++ / Add ....)

2. Add all the libraries: properties / C/C++ Build / Settings / Tool Settings tab / GCC C++ Linker / Libraries. I added all these libraries:

-ddsserialization
-ddskernel
-ddsutil
-ddsdatabase
-ddsuser
-ddsconf
-ddsconfparser
-dcpsgapi
-dcpssacpp
-ddsos

you don't need to specify the paths if you copy all the libraries in your usr/lib directory.

And that's about it! I also included the CheckStatus.h in the headers and the .cpp in the source since I always use the checkHandle and checkStatus functions.

Francois


Thanks Francois...I followed your suggestions and it works perfectly. The only other things I did was to create an external call to start/stop opensplice and to run idlpp from the ide, and added them to the favorites selections.

tim

#6 Francois

Francois

    Member

  • Members
  • PipPip
  • 15 posts

Posted 03 August 2010 - 05:36 PM

hey that's a great idea! I'm still a newbie with eclipse so could you explain me how you did it step by step?

thanks!

Francois

#7 Tim Wells

Tim Wells

    Member

  • Members
  • Pip
  • 4 posts

Posted 06 August 2010 - 01:01 PM

hey that's a great idea! I'm still a newbie with eclipse so could you explain me how you did it step by step?

thanks!

Francois



Francois,

It's very easy to do:

- right click on your project and select 'Run As' then select 'run configurations' from the context menu
- click the '+' tab on the top left of the left hand side splitter window to bring up the new configuration screen (in the right side splitter window)
- Put the name you want at the top, then on the main tab browse to the binary exec you want to launch...from the bin dir in opensplice....ospl for example...
- Add any arguments you want included in the Arguments edit box.....stop or start....for example.
- I'm going from memory here, but I believe there is an environment tabl where you can select the Opensplice variables as well. If so, select all the OSPL variables from the release.com file included with opensplice.
- Next, go to the common tab and check the Debug and Run checkboxes in the 'Display in favorites' menu, then click apply.

You should now see your new configuration name in both the drop down debug and and run (circled right arrow) icons on the main eclipse screen toolbar. There are other things you can do such as combining configurations
into a group launch but these are the basics. Lots of other choices. As I said, I'm going off memory so if I left something out or you have any problems, let me know. I set up configs to start, stop opensplice, run the pp, run my projects and it
works fine.

tim

#8 mikepc

mikepc

    Member

  • Members
  • Pip
  • 1 posts

Posted 24 August 2010 - 11:28 AM

Francois,

It's very easy to do:

- right click on your project and select 'Run As' then select 'run configurations' from the context menu
- click the '+' tab on the top left of the left hand side splitter window to bring up the new configuration screen (in the right side splitter window)
- Put the name you want at the top, then on the main tab browse to the binary exec you want to launch...from the bin dir in opensplice....ospl for example...
- Add any arguments you want included in the Arguments edit box.....stop or start....for example.
- I'm going from memory here, but I believe there is an environment tabl where you can select the Opensplice variables as well. If so, select all the OSPL variables from the release.com file included with opensplice.
- Next, go to the common tab and check the Debug and Run checkboxes in the 'Display in favorites' menu, then click apply.

You should now see your new configuration name in both the drop down debug and and run (circled right arrow) icons on the main eclipse screen toolbar. There are other things you can do such as combining configurations
into a group launch but these are the basics. Lots of other choices. As I said, I'm going off memory so if I left something out or you have any problems, let me know. I set up configs to start, stop opensplice, run the pp, run my projects and it
works fine.

tim


Hello,
I keep trying to configure Open Splice on the Eclipse platform but i don't get any progress..
I use the Open Splice DDS in the Java Standalone mode. The Eclipse platform i work on is the Eclipse edition for Java EE developers (Helios).
The problem is that when i try to create a run configuration i need to select an application type from the left hand side menu. It seems that none of the available application types can be used to create a working run configuration for a batch file. I want to be able to start, stop open splice from inside eclipse as well as to run the preprocessor and my applications without having to use a cmd console. I'm new to both eclipse and opensplice and any help would be really important to me.
Thanks in advance.

Mike

#9 jfleong

jfleong

    Member

  • Members
  • PipPip
  • 14 posts
  • Company:JL

Posted 04 June 2011 - 01:16 AM

Hey all I am fairly new to developing C++ in eclipse and am having problems getting started with opensplice dds. I am running eclipse with the CDT plugin and used cygwin to get the g++ compiler. All is well with configuring the project for C++, it's just getting all the includes and libraries all straight. Here is a small snippet of my error i get when building my eclipse project

C:/tools/opensplice/HDE/x86.win32/include/dcps/C++/SACPP/dds_builtinTopicsDcps_impl.h:552: error: ISO C++ forbids declaration of `ReturnCode_t' with no type
C:/tools/opensplice/HDE/x86.win32/include/dcps/C++/SACPP/dds_builtinTopicsDcps_impl.h:552: error: invalid use of `::'
C:/tools/opensplice/HDE/x86.win32/include/dcps/C++/SACPP/dds_builtinTopicsDcps_impl.h:552: error: `ReturnCode_t' declared as a `virtual' field
C:/tools/opensplice/HDE/x86.win32/include/dcps/C++/SACPP/dds_builtinTopicsDcps_impl.h:552: error: expected `;' before "get_key_value"
C:/tools/opensplice/HDE/x86.win32/include/dcps/C++/SACPP/dds_builtinTopicsDcps_impl.h:556: error: ISO C++ forbids declaration of `InstanceHandle_t' with no type
C:/tools/opensplice/HDE/x86.win32/include/dcps/C++/SACPP/dds_builtinTopicsDcps_impl.h:556: error: invalid use of `::'
C:/tools/opensplice/HDE/x86.win32/include/dcps/C++/SACPP/dds_builtinTopicsDcps_impl.h:556: error: `InstanceHandle_t' declared as a `virtual' field
C:/tools/opensplice/HDE/x86.win32/include/dcps/C++/SACPP/dds_builtinTopicsDcps_impl.h:556: error: expected `;' before "lookup_instance"
C:/tools/opensplice/HDE/x86.win32/include/dcps/C++/SACPP/dds_builtinTopicsDcps_impl.h:569: error: ISO C++ forbids declaration of `ReturnCode_t' with no type
C:/tools/opensplice/HDE/x86.win32/include/dcps/C++/SACPP/dds_builtinTopicsDcps_impl.h:569: error: invalid use of `::'
C:/tools/opensplice/HDE/x86.win32/include/dcps/C++/SACPP/dds_builtinTopicsDcps_impl.h:569: error: expected `;' before "check_preconditions"
C:/tools/opensplice/HDE/x86.win32/include/dcps/C++/SACPP/dds_builtinTopicsDcps_impl.h:580: error: ISO C++ forbids declaration of `ReturnCode_t' with no type

I have followed the above (opensplice libs are on my path) so I added the libs to my gcc linker ddsserialization, ddskernel, etc. But I think my problem is that I might be missing some includes. Might even by my project structure. Any help with this? I was just trying to run checkStatus.cpp and that already has compile errors (probably due to include problems)

Thanks,
Jason

#10 melih

melih

    Member

  • Members
  • Pip
  • 1 posts
  • Company:TAI

Posted 31 October 2011 - 11:45 AM

Hello,
I have same a problem.Anyone can be explain how to use eclipse ide+OpenSplice DDS+cygwin?

#11 bli

bli

    Member

  • Members
  • Pip
  • 1 posts
  • Company:kbsi

Posted 09 May 2012 - 05:38 PM

Hi Tim,

You mentioned that you followed Francois's steps and works perfectly. Are you working on the unix/linux platform?

I have an existing application that compile and running in Eclipse on windows but using MingW gcc. Should I download the linux version or windows version of opensplice distribution?

Thanks.

Biyan




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users