Thread: [orbitcpp-list] problems compiling orbitcpp-examples-0.2 with orbitcpp-0.30.4 under redhat 7
Status: Beta
Brought to you by:
philipd
From: Marcus R. <mar...@de...> - 2002-04-18 11:54:10
|
I have tried to compile the orbitcpp examples, but failed. I don't have any idea whats wrong, if it's a bug or if i'm doing something stupid. I get the following error: c++ -g -O0 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/orbit-1.0 -o client client.o generated/libhelloworldStubs.a -L/usr/lib /usr/lib/liborbitcpp.so -lstdc++ -lORBit -lIIOP -lORBitutil /usr/lib/libglib.so -lnsl -lm c++ -DHAVE_DLFCN_H=1 -I. -I. -Igenerated -I.. -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/orbit-1.0 -g -O0 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/orbit-1.0 -c server.cc In file included from server.cc:3: helloworld-impl.hh:13: looser throw specifier for `virtual char *hellomodule::Hello_impl::helloWorld (const char *)' generated/helloworld-cpp-skels.hh:46: overriding `virtual char *POA_hellomodule::Hello::helloWorld (const char *) throw (CORBA::SystemException)' make[2]: *** [server.o] Error 1 make[2]: Leaving directory `/tmp/orbitcpp-examples-0.2/helloworld' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/orbitcpp-examples-0.2/helloworld' make: *** [all-recursive] Error 1 ...... Code from the generated file.... namespace POA_hellomodule { class Hello : public ::hellomodule::Hello, public virtual PortableServer::ServantBase { .... .... .... // C++ interface public: Hello(); virtual ~Hello() { } ::PortableServer_Servant *_orbitcpp_get_c_servant() { return reinterpret_cast< ::PortableServer_Servant *>(&m_target); } ::hellomodule::Hello_ptr _this() { PortableServer::POA_var rootPOA = _default_POA(); PortableServer::ObjectId_var oid = rootPOA->activate_object(this); CORBA::Object_ptr object = rootPOA->id_to_reference(oid); return reinterpret_cast< ::_orbitcpp::stub::hellomodule::Hello *>(object); } virtual char *helloWorld(char const *greeting) throw (CORBA::SystemException) = 0; }; } Happy for any help. /* Marcus Rosell mar...@de... */ |
From: Sam C. <sc...@bi...> - 2002-04-18 12:13:28
|
Marcus Rosell <mar...@de...> wrote: > I have tried to compile the orbitcpp examples, but failed. >=20 > I don't have any idea whats wrong, if it's a bug or if i'm doing > something stupid. That's a bug. In helloworld-impl.cc and helloworld-impl.hh, the declarations for the hellowWorld() method are incorrect. Just add the appropriate throws clause yourself: char* helloWorld(const char* greeting) throws (CORBA::SystemException); What compiler are you using? This bug hasn't been reported before. --=20 Sam "Eddie" Couter | mailto:sc...@bi... Debian Developer | mailto:ed...@de... | jabber:sa...@ja... OpenPGP fingerprint: A46B 9BB5 3148 7BEA 1F05 5BD5 8530 03AE DE89 C75C |
From: Marcus R. <mar...@de...> - 2002-04-18 13:35:31
|
tor 2002-04-18 klockan 14.13 skrev Sam Couter: > Marcus Rosell <mar...@de...> wrote: > > I have tried to compile the orbitcpp examples, but failed. > > > > I don't have any idea whats wrong, if it's a bug or if i'm doing > > something stupid. > > That's a bug. In helloworld-impl.cc and helloworld-impl.hh, the > declarations for the hellowWorld() method are incorrect. Just add the > appropriate throws clause yourself: > > char* helloWorld(const char* greeting) > throws (CORBA::SystemException); I changed the declaration of helloWorld in "helloworld-impl.hh", but: ---------- helloworld-impl.cc:7: declaration of `char *hellomodule::Hello_impl::helloWorld (const char *)' throws different exceptions helloworld-impl.hh:14: than previous declaration `char *hellomodule::Hello_impl::helloWorld (const char *) throw (CORBA::SystemException)' ---------- Know we have two implementations of "hellomodule::Hello_impl::helloWorld", one in the .hh file and one in the .cc file. why can't the interface declaration of helloWorld in POA_hellomodule::Hello be overridden in derived class? > What compiler are you using? This bug hasn't been reported before. v2.96, the one Redhat is shipping with. I know people says it's crappy, but somehow they have compiled the rest of the system with it :-) > -- > Sam "Eddie" Couter | mailto:sc...@bi... > Debian Developer | mailto:ed...@de... > | jabber:sa...@ja... > OpenPGP fingerprint: A46B 9BB5 3148 7BEA 1F05 5BD5 8530 03AE DE89 C75C |
From: Sam C. <sc...@bi...> - 2002-04-18 23:36:50
|
Marcus Rosell <mar...@de...> wrote: > I changed the declaration of helloWorld in "helloworld-impl.hh", but: You need to change it in helloworld-impl.cc as well. The declarations must match. > why can't the interface declaration of helloWorld in > POA_hellomodule::Hello be overridden in derived class? Because that's just how C++ is. The method has the same number and types of arguments, which means you're talking about the exact same method. That means return types and thrown exceptions must match exactly. > v2.96, the one Redhat is shipping with. > I know people says it's crappy, but somehow they have compiled the rest > of the system with it :-) I was just curious. It's a real bug, and other compilers should also whinge about it but don't. --=20 Sam "Eddie" Couter | mailto:sc...@bi... Debian Developer | mailto:ed...@de... | jabber:sa...@ja... OpenPGP fingerprint: A46B 9BB5 3148 7BEA 1F05 5BD5 8530 03AE DE89 C75C |