Archived

This forum has been archived. Please start a new discussion on GitHub.

error: expected unqualified-id before "else"

I encountered one strange problem:
In file included from /usr/include/Ice/LocalObjectF.h:13,
from ../Interface/DBProxy.h:16,
.....
/usr/include/Ice/Handle.h:45: error: expected unqualified-id before "else"
/usr/include/Ice/Handle.h:56: error: expected unqualified-id before "else"
/usr/include/Ice/Handle.h:67: error: expected unqualified-id before "else"
/usr/include/Ice/Handle.h:77: error: expected unqualified-id before "else"
/usr/include/Ice/Handle.h:87: error: expected unqualified-id before "else"


I wrote source file DBProxy.ice and then geot DBProxy.{cpp,h}, in which I setup one service to accept the request for database. But when I included the DBProxy.h in other source files, the compiling error appeared.

Does anybody have any idea about this?

Comments

  • benoit
    benoit Rennes, France
    Hi,

    I don't know what could be causing this error. Which Ice version, platform and compiler do you use?

    Cheers,
    Benoit.
  • ICE Version: 3.0.1
    Platform: RHEL AS release 4
    GCC Version: gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-3)

    On the platform, I can run simple Printer example smoothly. But when coming to real project, the error appears.
  • benoit
    benoit Rennes, France
    You should make sure that you're using the same compiler and compiler flags as the ones used to build the demo. In any case, we only provide free support on the forums for latest Ice version so if you need further help with this, I recommend upgrading to Ice 3.4.0.

    Cheers,
    Benoit.