[omniORB] echo example compile problems under VC++ 6.0

Richard S Benson rsbenson@west.raytheon.com
Tue, 11 Dec 2001 13:12:41 -0700


I recently downloaded omniorb and am having trouble compiling the echo
example under VC++ 6.0.  The examples work fine using omniorb's makefiles,
but when I try compiling eg1.c (as provided by omniorb), I get the
following errors.

Compiling...
eg1.c
d:\swapps\omniorb\omni\include\omnithread.h(42) : error C2061: syntax error : identifier 'omni_mutex'
d:\swapps\omniorb\omni\include\omnithread.h(42) : error C2059: syntax error : ';'
d:\swapps\omniorb\omni\include\omnithread.h(43) : error C2061: syntax error : identifier 'omni_condition'
d:\swapps\omniorb\omni\include\omnithread.h(43) : error C2059: syntax error : ';'
d:\swapps\omniorb\omni\include\omnithread.h(44) : error C2061: syntax error : identifier 'omni_semaphore'
d:\swapps\omniorb\omni\include\omnithread.h(44) : error C2059: syntax error : ';'
d:\swapps\omniorb\omni\include\omnithread.h(45) : error C2061: syntax error : identifier 'omni_thread'
d:\swapps\omniorb\omni\include\omnithread.h(45) : error C2059: syntax error : ';'
d:\swapps\omniorb\omni\include\omnithread\nt.h(40) : error C2059: syntax error : 'string'
d:\swapps\omniorb\omni\include\omnithread.h(180) : error C2054: expected '(' to follow 'class'
d:\swapps\omniorb\omni\include\omnithread.h(180) : error C2085: 'omni_thread_fatal' : not in formal parameter list
d:\swapps\omniorb\omni\include\omnithread.h(180) : error C2143: syntax error : missing ';' before '{'
d:\swapps\omniorb\omni\include\omnithread.h(192) : error C2054: expected '(' to follow 'class'
d:\swapps\omniorb\omni\include\omnithread.h(192) : error C2085: 'omni_thread_invalid' : not in formal parameter list
d:\swapps\omniorb\omni\include\omnithread.h(192) : error C2143: syntax error : missing ';' before '{'
d:\swapps\omniorb\omni\include\omnithread.h(201) : error C2054: expected '(' to follow 'class'
d:\swapps\omniorb\omni\include\omnithread.h(201) : error C2085: 'omni_mutex' : not in formal parameter list
d:\swapps\omniorb\omni\include\omnithread.h(201) : error C2143: syntax error : missing ';' before '{'
d:\swapps\omniorb\omni\include\omnithread.h(244) : error C2054: expected '(' to follow 'class'
d:\swapps\omniorb\omni\include\omnithread.h(244) : error C2085: 'omni_mutex_lock' : not in formal parameter list
d:\swapps\omniorb\omni\include\omnithread.h(244) : error C2143: syntax error : missing ';' before '{'
d:\swapps\omniorb\omni\include\omnithread.h(262) : error C2054: expected '(' to follow 'class'
d:\swapps\omniorb\omni\include\omnithread.h(262) : error C2085: 'omni_condition' : not in formal parameter list
d:\swapps\omniorb\omni\include\omnithread.h(262) : error C2143: syntax error : missing ';' before '{'
d:\swapps\omniorb\omni\include\omnithread.h(312) : error C2054: expected '(' to follow 'class'
d:\swapps\omniorb\omni\include\omnithread.h(312) : error C2085: 'omni_semaphore' : not in formal parameter list
d:\swapps\omniorb\omni\include\omnithread.h(312) : error C2143: syntax error : missing ';' before '{'
d:\swapps\omniorb\omni\include\omnithread.h(343) : error C2054: expected '(' to follow 'class'
d:\swapps\omniorb\omni\include\omnithread.h(343) : error C2085: 'omni_semaphore_lock' : not in formal parameter list
d:\swapps\omniorb\omni\include\omnithread.h(343) : error C2143: syntax error : missing ';' before '{'
d:\swapps\omniorb\omni\include\omnithread.h(361) : error C2054: expected '(' to follow 'class'
d:\swapps\omniorb\omni\include\omnithread.h(361) : error C2085: 'omni_thread' : not in formal parameter list
d:\swapps\omniorb\omni\include\omnithread.h(361) : error C2143: syntax error : missing ';' before '{'
d:\swapps\omniorb\omni\include\omnithread.h(532) : error C2143: syntax error : missing '{' before ':'
d:\swapps\omniorb\omni\include\omnithread.h(532) : error C2059: syntax error : ':'
d:\swapps\omniorb\omni\include\omniorb3\corba_sysdep.h(429) : fatal error C1189: #error :  "Cannot use this C++ header file for non C++ programs."
Error executing cl.exe.

echotest.exe - 36 error(s), 0 warning(s)




I can't figure out what the problem is.  I imagine it's a configuration problem in Visual Studio.
I set all of my preprocessor defines for NT4.0 and I added the omniorb include directory to the include path.

Any ideas would be much appreciated!