Home Help Center

slice2cpp syntax error using string simple types

Hi all,
im currently having problems with slice2cpp creating sources for the following
TestInterface.ice file:

module TestModule{
interface TestInterface{
string userName;
bool IsConnected();
which give me a syntax error for the line containing string userName;
>> stUserData.ice:3: syntax error

I'm using the command
/opt/ICE-1.2.0/bin/slice2cpp TestInterface.ice
to get c++ source files from this. slice2java reports the same problem.
However, it compiles fine if I remove the string from the interface.

My system is SUSE Linux 9.1, ICE v1.2.0, and I compiled & installed ICE without problems.

Have I missed something I need to setup for Linux so that 'string' is a basic type the slice2cpp code generator will accept?



  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    It's a syntax error because interfaces cannot have data members.
  • Ah! Yes!

    Hi again,
    that's absolutely right. I'm mixing up my interface definition and the implementation...

Sign In or Register to comment.