[omniORB-dev] [WinCE port] compile error #001, #002, #003, #004 in nt.cc

Xavier Outhier xavier.outhier@anfdata.cz
Mon, 28 Apr 2003 16:44:16 +0200


Hi all,

Let's start it for real.

- Error #001

The first error I got was in 
 omniORB-4.0.1/src/lib/omnithread/nt.cc

D:\Windows CE Tools\WCE300\ms pocket pc\include\stdlib.h(928) : error C2065: '_JBLEN'

After looking in the stdlib.h I found out that this was due because a
compile variable was not set.

So in D:\omniORB-4.0.1\mk\platforms\mips_pocketpc_wince300.mk
I replaced
IMPORT_CPPFLAGS += -D__MIPS__ -D__POCKETPC__ -D__OSVERSION__=WCE300
with
IMPORT_CPPFLAGS += -DMIPS -D__MIPS__ -D__POCKETPC__ -D__OSVERSION__=WCE300

Seems effective so far.

- Error #002

nt.cc(36) : fatal error C1083: Cannot open include file: 'errno.h': No such file or directory

I comment out the include and this fix it. Seems that nothing was used
from the include.

- Error #003

D:\Windows CE Tools\WCE300\ms pocket pc\include\winnt.h(3153) : error C2146: syntax error : missing ';' before identifie
r 'ContextRecord'
D:\Windows CE Tools\WCE300\ms pocket pc\include\winnt.h(3153) : error C2501: 'PCONTEXT' : missing storage-class or type
specifiers

Again a problem with a macro to define: this time it was _ALPHA_ so 
So in D:\omniORB-4.0.1\mk\platforms\mips_pocketpc_wince300.mk
I replaced
IMPORT_CPPFLAGS += -DMIPS -D__MIPS__ -D__POCKETPC__ -D__OSVERSION__=WCE300
with
IMPORT_CPPFLAGS += -D_MIPS_ -DMIPS -D__MIPS__ -D__POCKETPC__ -D__OSVERSION__=WCE300

Seems effective so far.

- Error #004

nt.cc(38) : fatal error C1083: Cannot open include file: 'process.h': No such file or directory

This time suppressing is not effective as some functions are really used:

nt.cc(437) : error C2065: 'DuplicateHandle' : undeclared identifier
nt.cc(621) : error C2065: '_beginthreadex' : undeclared identifier
nt.cc(789) : error C2065: '_endthreadex' : undeclared identifier

 a) Adding include of #include <secpkg.h> where is declared DuplicateHandle
do not help; still something missing :(
There are a lot of error but the first (the most important I think) is 
D:\Windows CE Tools\WCE300\ms pocket pc\include\secpkg.h(71) : error C2059: syntax error : '__stdcall'
 
 b) Regarding _begin/endthreadex

It's interesting to note this
D:\Windows CE Tools\WCE300\ms pocket pc\mfc\src\thrdcore.cpp(13):#include <process.h>    // for _beginthreadex and
_endthreadex
while there is no process.h available.

and this
D:\Windows CE Tools\WCE300\ms pocket pc\mfc\src\wceimpl.h(316):unsigned long AFXAPI wce__beginthreadex(void *security,
unsigned stack_size, 

Is it safe to use this version which has the same signature as the original
knowing that there is this warning in the header file
// THIS FILE IS FOR MFCCE IMPLEMENTATION ONLY?

Replacing leads to this:
D:\Windows CE Tools\WCE300\ms pocket pc\mfc\src\wceimpl.h(94) : warning C4005: '_ttoi' : macro redefinition
        D:\Windows CE Tools\WCE300\ms pocket pc\include\tchar.h(190) : see previous definition of '_ttoi'
D:\Windows CE Tools\WCE300\ms pocket pc\mfc\src\wceimpl.h(95) : warning C4005: '_itot' : macro redefinition
        D:\Windows CE Tools\WCE300\ms pocket pc\include\tchar.h(187) : see previous definition of '_itot'
[...]

I have no more idea for today. 
Is there a better way to proceed than this pedestrian one?

Is this file to be ported or is it something that can be skip.
I think it should be kept but I'm not sure.

Best regards,

Xavier.