[omniORB] omniidl on 4.0.7 doesn't properly handle #pragma hh

Bartosz Zembrzuski Bartosz.Zembrzuski at softax.com.pl
Wed Mar 1 12:55:25 GMT 2006


Hi

I'm using omniOrb on Windows for a few years - starting from version 3.0.x.

Recently I tried to migrate to latest 4.0.7 release (from 4.0.3) and 
encountered "Access violation" while running program compiled against 4.0.7

My program has stub compiled into DLL which was than used by another 
DLLs and executables.

When I moved stub directly into exe - problems have disappeared.

My investigation revealed that on 4.0.3 (and earlier versions) omniidl 
had supported insertion of #pragma hh

In my idl I've got following text:
#pragma hh #ifndef __SMID_SYSDEP_H_EXTERNAL_GUARD__
#pragma hh #define __SMID_SYSDEP_H_EXTERNAL_GUARD__
#pragma hh #include "SMID_sysdep.hxx"
#pragma hh #endif

And I've also "Smid_sysdep.hxx" file:

#if !defined(_SMID_LIBRARY)
#define USE_core_stub_in_nt_dll
#define USE_dyn_stub_in_nt_dll
#endif

Before 4.0.7 this combination (rewritten from omniorb 3.0.x source 
files) works fine (without any problems, access violations etc.).

Now it doesn't work because omniidl misses #pragma hh and doesn't put 
coressponding #include "smid_sysdep.hxx" into generated stub header file.

I'd like to notice that using #pragma hh is still described in chapter 
12 of manual.

My question is:
- is such behaviour of omniidl intensional ?
- if it is. What is preferred workaround/solution ?
- if if isn't. Does it influence behaviour of omniOrb core ? I've found 
similar syntax somewhere around COS library.


regards






More information about the omniORB-list mailing list