[omniORB] mismatched #if/#endif pair in file 'echo.hh'

Christian Akerø Christian.Akero@ergo.no
Tue, 11 Sep 2001 12:30:08 +0200


info:nt4.0 , omniidl2(a fixed version), mvc++ 6.0
  
Well I'm new to this omniorbthing and have been trying to compile a simple
example(echo) with the command
nmake /f dir.mak but i always get this error code? 
 

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        cl /nologo /c -O2 -MD -GX -D__WIN32__ -D__x86__ -D__NT__
-D__OSVERSION__
=4 -I. -I..\..\..\include /TpechoSK.cc
echoSK.cc
..\..\..\include\omniORB2/omniInternal.h(116) : warning C4518:
'__declspec(dllim
port ) ' : storage-class or type specifier(s) unexpected here; ignored
echo.hh(57) : fatal error C1070: mismatched #if/#endif pair in file
'echo.hh'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

I get the same error while trying to compile other examples and when I
compile interfaces with the omniidl2 the sourcecode generated, seems
unfinished, like the code below!

----------------------

The echo.hh then looks like this: 

#ifndef __echo_hh__
#define __echo_hh__

#ifndef USE_omniORB_logStream
#define USE_omniORB_logStream
#endif

#ifndef __CORBA_H_EXTERNAL_GUARD__
#define __CORBA_H_EXTERNAL_GUARD__
#include <omniORB2/CORBA.h>
#endif


#ifdef _LC_attr
#error "A local CPP macro _LC_attr has already been defined."
#else
#ifdef  USE_stub_in_nt_dll
#define _LC_attr _OMNIORB_NTDLL_IMPORT
#else
#define _LC_attr
#endif
#endif

#ifndef __Echo__
#define __Echo__
class   Echo;
typedef Echo* Echo_ptr;
typedef Echo_ptr EchoRef;

class Echo_Helper {
  public:
  static Echo_ptr _nil();
  static CORBA::Boolean is_nil(Echo_ptr p);
  static void release(Echo_ptr p);
  static void duplicate(Echo_ptr p);
  static size_t NP_alignedSize(Echo_ptr obj,size_t initialoffset);
  static void marshalObjRef(Echo_ptr obj,NetBufferedStream &s);
  static Echo_ptr unmarshalObjRef(NetBufferedStream &s);
  static void marshalObjRef(Echo_ptr obj,MemBufferedStream &s);
  static Echo_ptr unmarshalObjRef(MemBufferedStream &s);
};
typedef _CORBA_ObjRef_Var<Echo,Echo_Helper> Echo_var;

#endif
#define Echo_IntfRepoID "IDL:Echo:1.0"

class Echo : public virtual omniObject, public virtual CORBA::Object {
public:

  virtual char *  echoString ( const char *  mesg ) = 0;
  static Echo_ptr _duplicate(Echo_ptr);
  static Echo_ptr _narrow(CORBA::Object_ptr);
  static Echo_ptr _nil();

  static inline size_t NP_alignedSize(Echo_ptr obj,size_t initialoffset) {
    return CORBA::AlignedObjRef(obj,Echo_IntfRepoID,

(seems like it stops generating code right in the middel of a function????)
I dont get this?
Does anybody have a clue?

Christian