Archived
This forum has been archived. Please start a new discussion on GitHub.
Problem including files in ice files
Dears,
I'm trying to launch the following command:
but I get an error.
I have to include the <Ice/Identity.ice> file. It is located in the /usr/share/slice directory. But slice2py finds the following error:
If I substitute
I can't understand why! Where am I wrong?
Thanks!
I'm trying to launch the following command:
slice2py -IDIR/usr/share/slice/ --ice VirtualReality.ice
but I get an error.
I have to include the <Ice/Identity.ice> file. It is located in the /usr/share/slice directory. But slice2py finds the following error:
error: Can't open include file "Ice/Identity.ice" #include <Ice/Identity.ice>I'm not able to pass it to slice2py. I can't understand why.
#ifndef VIRTUALREALITY_ICE #define VIRTUALREALITY_ICE #include <Ice/Identity.ice> module VirtualReality { const int nJoint = 7; const int nCartesianDof = 6; sequence<double> DoubleSeq; const int DoubleSeqSize = 7; interface CallbackReceiver { void setEnvironment(string str); void setPosQuat(DoubleSeq seq); }; interface GUIserver { void addClient(Ice::Identity ident); void setProxy(CallbackReceiver* proxy); DoubleSeq getPosQuat(); void startPosQuatStream(); void stopPosQuatStream(); void shutdown(); }; };
If I substitute
#include <Ice/Identity.ice>with
#include </usr/share/slice/Ice/Identity.ice>and call
slice2py --ice VirtualReality.iceit works.
I can't understand why! Where am I wrong?
Thanks!
0
Comments
-
Hi Matteo
slice2py -IDIR/usr/share/slice/ --ice VirtualReality.ice
This command is incorrect, DIR is expected to be the directory path, so the correct command will beslice2py -I/usr/share/slice/ --ice VirtualReality.ice
Cheers,
José0 -
Ops,
thanks!0 -
By the way,
if I try to use this.ice file withIce.loadSlice('VirtualReality.ice')
I obtainFile "Pa10RobotIce.py", line 5, in <module> Ice.loadSlice('VirtualReality.ice') RuntimeError: Slice preprocessing failed for `VirtualReality.ice'
while "compiling" it with slice2py it works correctly.0 -
Hi Matteo,
You should also pass -I options to loadSliceIce.loadSlice('-I/usr/share/slice VirtualReality.ice')
Cheers,
José0