Discussion:
[omniORB] Compilation error using g++ in 64-bit Linux 2.4.21
Sankar S Salvady
2010-10-20 06:46:55 UTC
Permalink
Hello,

I am a newbie to CORBA. I have so far compiled an IDL file that created a .h
and .cxx file. But the compilation of the cxx file gives me a a whole of
compilation errors. I have posted a part of it below. In the error message
"channelAttributes.cxx" is the file generated from the IDL file
"channelAttributes.idl".

Compile command:
/usr/bin/g++ -g -c
-I/filer_build/ssalvady/ccm_wa/kasenna/mbservices%tot_ssalvady/mbservices/buildreleases/usr/omniORB-4.0.5/include
channelAttributes.cxx

Error:
In file included from
/filer_build/ssalvady/ccm_wa/kasenna/mbservices%tot_ssalvady/mbservices/buildreleases/usr/omniORB-4.0.5/include/omniORB4/CORBA.h:373,
from channelAttributes.h:10,
from channelAttributes.cxx:3:
/filer_build/ssalvady/ccm_wa/kasenna/mbservices%tot_ssalvady/mbservices/buildreleases/usr/omniORB-4.0.5/include/omniORB4/corbaidl_defs.hh:1848:
`
LongDouble' undeclared in namespace `CORBA'
/filer_build/ssalvady/ccm_wa/kasenna/mbservices%tot_ssalvady/mbservices/buildreleases/usr/omniORB-4.0.5/include/omniORB4/corbaidl_defs.hh:1848:
template
argument 1 is invalid
/filer_build/ssalvady/ccm_wa/kasenna/mbservices%tot_ssalvady/mbservices/buildreleases/usr/omniORB-4.0.5/include/omniORB4/corbaidl_defs.hh:1857:
no
type `LongDouble' in `CORBA'
/filer_build/ssalvady/ccm_wa/kasenna/mbservices%tot_ssalvady/mbservices/buildreleases/usr/omniORB-4.0.5/include/omniORB4/corbaidl_defs.hh:1857:
syntax
error before `*' token
/filer_build/ssalvady/ccm_wa/kasenna/mbservices%tot_ssalvady/mbservices/buildreleases/usr/omniORB-4.0.5/include/omniORB4/corbaidl_defs.hh:1858:
missing
';' before right brace
/filer_build/ssalvady/ccm_wa/kasenna/mbservices%tot_ssalvady/mbservices/buildreleases/usr/omniORB-4.0.5/include/omniORB4/corbaidl_defs.hh:
In
copy constructor `CORBA::LongDoubleSeq::LongDoubleSeq(const
CORBA::LongDoubleSeq&)':
/filer_build/ssalvady/ccm_wa/kasenna/mbservices%tot_ssalvady/mbservices/buildreleases/usr/omniORB-4.0.5/include/omniORB4/corbaidl_defs.hh:1853:
`
LongDouble' undeclared in namespace `CORBA'
/filer_build/ssalvady/ccm_wa/kasenna/mbservices%tot_ssalvady/mbservices/buildreleases/usr/omniORB-4.0.5/include/omniORB4/corbaidl_defs.hh:1853:
template
argument 1 is invalid
..................
..................
<snip>
..................
..................
/filer_build/ssalvady/ccm_wa/kasenna/mbservices%tot_ssalvady/mbservices/buildreleases/usr/omniORB-4.0.5/include/omniORB4/poa.h:625:
confused by earlier errors, bailing out
make: *** [channelAttributes.o] Error 1


Am I missing something obvious here ? I would appreciate any help

Thanks
Sankar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20101019/8bcbd20b/attachment.htm
Thomas Lockhart
2010-10-20 06:53:56 UTC
Permalink
...
Post by Sankar S Salvady
LongDouble' undeclared in namespace `CORBA'
Am I missing something obvious here ? I would appreciate any help
Your platform does not have LongDouble support? This may be a
configuration option to omniORB you can fix, or it may be an artifact of
the version of your compiler.

hth

- Tom
Thomas Lockhart
2010-10-20 07:36:45 UTC
Permalink
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20101019/e91b3eb3/attachment.htm
Sankar S Salvady
2010-10-22 04:41:27 UTC
Permalink
Sorry Tom, didnt realize that 'Reply' to the mail sends it only to you.

Regarding your reply , I do not have any 'Long double' in my IDL file, I
have only 'long' . The error message suggests that the undefined 'long
double' are from the files in the INCLUDE directory, not in files generated
from my idl

Is there something wrong in my compilation (Makefile below) ?


CC = /usr/bin/c++
CPPFLAGS = -g -c
LDFLAGS = -g
OMNI_HOME = /filer_build/ssalvady/buildreleases/usr/omniORB-4.0.5
OMNI_INCLUDES = -I$(OMNI_HOME)/include
OMNI_LIB_DIR = $(OMNI_HOME)/lib
OMNIIDL = $(OMNI_HOME)/bin/omniidl
INCLUDES = $(OMNI_INCLUDES)
LIBS = -lomniORB4 -lomnithread -lomniDynamic4
OBJECTS = channelAttributes.o channelAttributesImpl.o server.o

all: $(OBJECTS)
$(CC) $(LDFLAGS) -o server -L$(OMNI_HOME)/lib $(OBJECTS) $(LIBPATH) $(LIBS)

channelAttributes.o: channelAttributes.cxx channelAttributes.h
$(CC) $(CPPFLAGS) $(INCLUDES) -L$(OMNI_HOME)/lib channelAttributes.cxx

server.o: server.cc channelAttributes.h
$(CC) $(CPPFLAGS) $(INCLUDES) server.cc

channelAttributesImpl.o: channelAttributesImpl.cc channelAttributesImpl.h
channelAttributes.h
$(CC) $(CPPFLAGS) $(INCLUDES) channelAttributesImpl.cc

channelAttributes.cxx: channelAttributes.idl
$(OMNI_HOME)/bin/omniidl -bcxx -Wbh=.h channelAttributes.idl


Thanks
Sankar
Please always reply to the list.
I tried c++ instead of g++ , the result is the same.
How do I fix the configuration option ? Any quick pointers would be
great, Tom.
I do not use the long double in my code, but it seems to be supported in my
RPM build of omniORB-4.1.4 on Fedora 13. You are using very old versions of
everything and I don't have those versions available to me to look at.
I do see in this newer version that "long double" in an IDL file produces
references to CORBA::LongDouble in the stubs and skeletons. So that part
seems OK.
In this newer version, definitions are guarded by #if HAS_LongDouble so you
may want to look at the omniORB header files for that and see why it might
not be defined. I would think that you will need it defined when building
omniORB to have it properly available when trying to use it. otoh I would
have guessed that the omniidl compiler would have not produced code
referencing CORBA::LongDouble if it was disabled during the package build.
hth
- Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20101021/aed745e1/attachment.htm
Thomas Lockhart
2010-10-22 06:47:05 UTC
Permalink
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20101021/ad13e4ce/attachment.htm
Loading...