Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: Compiling CORBA Samples
Topic Summary:
Created On: 22-Dec-2006 03:09
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 22-Dec-2006 03:09
User is offline View Users Profile Print this message


John Paul Howell

Posts: 1
Joined: 22-Dec-2006

This week, I have been trying to learn how to model and compile a CORBA application using I-Logix Rhapsody. I come from a Linux/Unix GCC toolchain background. It has been a very enlightening experience and I would like to share what I have accomplished. I do have some questions for I-Logix in the Problem and Solutions area

I have successfully compiled and executed the example Rhapsody CORBA models, but I would appreciate any tips, hints, suggestions, etc. anybody might have about this process.

My Setup:
~~~~~~~~

Compiler: Visual Studio C++ .NET 2003

Rhapsody: 7.0

ACE+TAO: ACE+TAO-1.4a_with_latest_patches.tar.gz from Object Computing, Inc. <http://www.theaceorb.com>

My Task:
~~~~~~~~

(1) Compile ACE and TAO per instructions -- everything built with no problems.

(2) Compile and run the sample CORBA application, Sdm_Observers, bundled with Rhapsody.

The Problems and the Solutions:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(1) The default settings for Rhapsody CORBA applications causes a reference to POA.h to be included in the generated code. This file does not exist in the ACE+TAO-1.4 distribution I downloaded. To overcome this problem, I deleted the reference to POA.h from the Project Properties CORBA::TAO::CPP_StandardInclude

QUESTION:
~~~~~~~~~
However, I have a pre-compiled distribution from another source (dated around 2003) that does have the POA.h header file. I am new to ACE+TAO, could somebody shed some light on this difference?

(2) The paths to the libraries in the Rhapsody CORBA::TAO::CORBALibs property are all wrong. A quick edit of the paths solved this problem.

QUESTION:
~~~~~~~
What version of ACE+TAO are the default, out-of-the-box properties set for? Since I am rather new to CORBA, are the default values really the minimally required defaults for a CORBA application usign TAO?

(3) The linker returned lots of unresolved symbol errors such as:

(I am just listing the decorated names. Use the undname.exe utility to get the full function declaration.)

?strsncpy@ACE_OS@@YAPAGPAGPBGI@Z
?strnchr@ACE_OS@@YAPBGPBGGI@Z
?strnstr@ACE_OS@@YAPBGPBG0I@Z

SOLUTION:
~~~~~~~~~
Add /Zc:wchar_t to Project Properties CPP_CG::Microsoft::CompileSwitches (And for good measure, I also added /Zc:forScope)

(4) The linker still returned unresolved symbol errors in the client and server related files generated by the tao_idl compiler for

public: static int ACE_String_Base_Const::npos

This is a global constant defined in $ACE_ROOT/ace/String_Base_Const.*
According to the Visual Studio help file discussing global constants, "If you try to use a global constant in C++ in multiple files you get an unresolved external error."
<http://msdn2.microsoft.com/en-...rary/0d45ty2d.aspx>

SOLUTION:
~~~~~~~~~
Edit the offending file and after all the #include statements, enter the following line:

ssize_t ACE_String_Base_Const::npos = -1;

QUESTION:
~~~~~~~~~
I am having to edit the output of the IDL compiler to get around this error. Yet, when I create the solutions file and compile in the DevExampleGuide, I don't have to do any special editing of the client and server output source. Why is this and what can I do keep from doing these edits in Rhapsody?

(5) The compiler issues warnings about unsafe mixing of BOOL and type bool in the "==" operation in OS_NS_Thread.inl line 4728. At this point, I am not worrying about this, but it would be nice to have the Rhapsody generated code compile cleanly. Am I missing some compile switch or something?
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.