Thread: [orbitcpp-list] What's this?
Status: Beta
Brought to you by:
philipd
From: Bruce I. <bru...@ec...> - 2000-07-19 18:48:40
|
I recently downloaded and compiled OrbitCPP, but I'm kind of fumbling around in the dark here, so please forgive me if this is a stupid question. I've created a cheesy little stack IDL modelling off the examples. The IDL compiled, and I created a teststack-impl.hh and teststack-impl.cc and derived the classes as I see the examples are. The problem is when I try to compile the this tiny bit of code (using g++ -c teststack-impl.cc `orbitcpp-config --cflags server` I get the following errors: teststack-cpp-skels.hh:18: parse error before `m_cservant' teststack-cpp-skels.hh:24: parse error before `_TestModule_MyStack_epv' teststack-cpp-skels.hh:25: parse error before `_vepv' Along with a bunch of unhappy C++ fluff messages that I can post here if necessary. Looking at teststack-cpp-skels.hh, I see the following code: ... public: struct _orbitcpp_Servant { ::_orbitcpp::c::POA_TestModule_MyStack m_cservant; // <-- Line 18 POA_TestModule::MyStack *m_cppservant; } m_target; ... This strikes me as kind of strange (But I'm fairly new to C++, too.) Is this supposed to be happening? Did I miss a necessary flag when using orbit-idl (I did orbit-idl -lc++ teststack.idl) Am I missing a necessary C flag or include file? Any insights would be appreciated. PS: FWIW, I'm currently on GCC Version 2.95.2, which I downloaded and compiled off prep.ai.mit.edu after the egcs that came with RedHat crapped out trying to compile OrbitCPP. I have the correctly patched version of ORBIT from the orbitcpp FTP site on my system. The system is running RedHat 6.2. Please let me know if any more information is needed. -- Bruce Ide bru...@ec... "GP: Is Eris True?" "M2: Everything is true." "GP: Even false things?" "M2: Even false things are true." "GP: How can that be?" "M2: I don't know, man. I didn't do it." |
From: Andreas K. <ak...@ix...> - 2000-07-19 19:38:41
|
Hi Bruce, From my point of view, this looks like a bug in the idl compiler. (As a matter of fact, anything that makes the compiler generate erroneous c++ is) I'm sorry that you ran into this at this point, and it should help us fix it if you'd post the idl that led to the error. thanks andy > I've created a cheesy little stack IDL modelling off the examples. The > IDL compiled, and I created a teststack-impl.hh and teststack-impl.cc > and derived the classes as I see the examples are. The problem is when I > try to compile the this tiny bit of code (using g++ -c teststack-impl.cc > `orbitcpp-config --cflags server` I get the following errors: > > teststack-cpp-skels.hh:18: parse error before `m_cservant' > teststack-cpp-skels.hh:24: parse error before `_TestModule_MyStack_epv' > teststack-cpp-skels.hh:25: parse error before `_vepv' -- Don't innovate, intimidate. |
From: Bruce I. <bru...@ec...> - 2000-07-19 19:47:31
|
Andreas Kloeckner wrote: > > Hi Bruce, > > >From my point of view, this looks like a bug in the idl compiler. (As a > matter of fact, anything that makes the compiler generate erroneous c++ > is) I'm sorry that you ran into this at this point, and it should help > us fix it if you'd post the idl that led to the error. No problem, it's only a few lines. Here it is: module TestModule { interface MyStack { void push(in long toPush); long pop(); }; }; -- Bruce Ide bru...@ec... "GP: Is Eris True?" "M2: Everything is true." "GP: Even false things?" "M2: Even false things are true." "GP: How can that be?" "M2: I don't know, man. I didn't do it." |
From: Andreas K. <ak...@ix...> - 2000-07-19 20:02:42
|
Hmmm, my message got truncated somehow. (Perhaps my stupidity, who knows.) Here's what I meant to say. Andreas Kloeckner wrote: > Hi Bruce, > From my point of view, this looks like a compiler bug. (as a > matter of fact, anything that makes the compiler generate erroneous c++ > is) I'm sorry that you ran into this at this point, and it should help > us fix it if you'd post the idl that led to the error. > > thanks > andy |
From: Andreas K. <ak...@ix...> - 2000-07-19 22:10:13
|
Now there's something strange here. 8-| Andreas Kloeckner wrote: > > Hmmm, my message got truncated somehow. (Perhaps my stupidity, who > knows.) Here's what I meant to say. > > Andreas Kloeckner wrote: > > Hi Bruce, > > > > > matter of fact, anything that makes the compiler generate erroneous c++ > > is) I'm sorry that you ran into this at this point, and it should help > > us fix it if you'd post the idl that led to the error. > > > > thanks > > andy > -- Don't innovate, intimidate. |
From: Bruce I. <bru...@ec...> - 2000-07-19 22:23:33
|
Andreas Kloeckner wrote: > > Now there's something strange here. 8-| > > <SNIP> What? Did it compile the IDL correctly for you? -- Bruce Ide bru...@ec... "GP: Is Eris True?" "M2: Everything is true." "GP: Even false things?" "M2: Even false things are true." "GP: How can that be?" "M2: I don't know, man. I didn't do it." |
From: Andreas K. <ak...@ix...> - 2000-07-20 08:34:53
|
> > Now there's something strange here. 8-| > > What? Did it compile the IDL correctly for you? This was actually referring to Netscape always clipping this one line I wanted to send. But heck, who cares. Yes, the IDL compiled correctly for me. Here's what I did, I suspect you omitted the -lc step. orbit-idl -lc stuff.idl # <-- this one orbit-idl -lc++ stuff.idl gcc -c *.c `orbit-config --cflags client server` g++ -c *.cc `orbit-config --cflags client server` (as you were told by the ... uh ... I guess we _really_ should document this step!) wasn't there someone who wanted to write a faq for orbitcpp some time ago? I'll put this into the FAQ in the archive. bye andy -- Don't innovate, intimidate. |
From: Bruce I. <nr...@us...> - 2000-07-20 11:18:34
|
Andreas Kloeckner wrote: > > > > Now there's something strange here. 8-| > > > > What? Did it compile the IDL correctly for you? > > This was actually referring to Netscape always clipping this one line I > wanted to send. But heck, who cares. Yes, the IDL compiled correctly for > me. Here's what I did, I suspect you omitted the -lc step. > > orbit-idl -lc stuff.idl # <-- this one > orbit-idl -lc++ stuff.idl > gcc -c *.c `orbit-config --cflags client server` > g++ -c *.cc `orbit-config --cflags client server` That, in fact, worked. I did get a bunch of compiler errors because I was trying to use STL in a private variable. I suspect gcc 2.95.2 doesn't like STL. It errors out in the C headers and not in anything that seems to be related to OrbitCPP. Has anyone else seen problems with this? I'd really like to use the advanced features of C++ with OrbitCPP :-) If I'm not making another silly mistake here, maybe we should send a bug report to the GCC maintainers. > > (as you were told by the ... uh ... I guess we _really_ should document > this step!) > wasn't there someone who wanted to write a faq for orbitcpp some time > ago? I'll put this into the FAQ in the archive. I can write up some questions from things I encountered trying to get it running when I get home from work tonight. Is there any particular format that should be used? HTML? Plain Text? LaTeX? I can work with a lot of them. -- Bruce Ide nr...@us... If trees screamed would we be as quick to cut them down? Possibly, if they screamed all the time. |