It seems kernel and ntdll are not seperated properly as I can build ntdll.dll on cygwin now with no problems but when it gets to dlls/kernel it is failing with this error. If I include the ntdll files wine/memory/* wine/loaders/* and others in kernel32 then it will build.
Thanks Steven
dllwrap -k --def kernel32.spec.def -o kernel32.dll kernel.res.o ../../ole/ole2nl s.o change.o comm.o computername.o console.o debugger.o editline.o format_msg.o kernel_main.o lcformat.o locale.o stress.o string.o sync.o thunk.o time.o toolhe lp.o utthunk.o win87em.o windebug.o wowthunk.o kernel32.dll.dbg.o --entry _MAIN _KernelInit -L../../dlls -lntdll -L../../libs/wine -lwine -L../../libs/unicode -lwine_unicode -L../../libs/port -lwine_port -lm Warning: resolving _MAIN_KernelInit by linking to _MAIN_KernelInit@12 Use --enable-stdcall-fixup to disable these warnings Use --disable-stdcall-fixup to disable these fixups comm.o(.text+0x10f5): In function `EscapeCommFunction': /cygdrive/g/src/wine-dev/wine/dlls/kernel/comm.c:593: undefined reference to `_F ILE_GetUnixHandle' comm.o(.text+0x15b2): In function `PurgeComm': /cygdrive/g/src/wine-dev/wine/dlls/kernel/comm.c:710: undefined reference to `_F ILE_GetUnixHandle' comm.o(.text+0x1761): In function `ClearCommError': /cygdrive/g/src/wine-dev/wine/dlls/kernel/comm.c:751: undefined reference to `_F ILE_GetUnixHandle' comm.o(.text+0x1939): In function `SetupComm': /cygdrive/g/src/wine-dev/wine/dlls/kernel/comm.c:815: undefined reference to `_F ILE_GetUnixHandle' comm.o(.text+0x1e12): In function `SetCommState': /cygdrive/g/src/wine-dev/wine/dlls/kernel/comm.c:910: undefined reference to `_F ILE_GetUnixHandle' comm.o(.text+0x25fc):/cygdrive/g/src/wine-dev/wine/dlls/kernel/comm.c:1255: more undefined references to `_FILE_GetUnixHandle' follow computername.o(.text+0x5e4): In function `COMPUTERNAME_Init': /cygdrive/g/src/wine-dev/wine/dlls/kernel/computername.c:219: undefined referenc e to `_PROFILE_GetWineIniBool' computername.o(.text+0x161c): In function `SetComputerNameW': /cygdrive/g/src/wine-dev/wine/dlls/kernel/computername.c:542: undefined referenc e to `_PROFILE_GetWineIniBool' kernel_main.o(.text+0x86): In function `process_attach': /cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main.c:75: undefined reference to `_FILE_umask' kernel_main.o(.text+0x98):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main. c:82: undefined reference to `_RELAY_Init' kernel_main.o(.text+0xf3):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main. c:127: undefined reference to `_TASK_CreateMainTask' kernel_main.o(.text+0x13f):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:138: undefined reference to `_main_create_flags' kernel_main.o(.text+0x196):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:141: undefined reference to `_main_create_flags' kernel_main.o(.text+0x1bb):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:95: undefined reference to `_NE_SetEntryPoint' kernel_main.o(.text+0x1d5): In function `process_attach': /cygdrive/g/src/wine-dev/wine/dlls/kernel/../../include/wine/library.h:186: unde fined reference to `_NE_SetEntryPoint' kernel_main.o(.text+0x1ef):/cygdrive/g/src/wine-dev/wine/dlls/kernel/../../inclu de/wine/library.h:187: undefined reference to `_NE_SetEntryPoint' kernel_main.o(.text+0x219): In function `process_attach': /cygdrive/g/src/wine-dev/wine/dlls/kernel/../../include/wine/winbase16.h:402: un defined reference to `_TASK_InstallTHHook' kernel_main.o(.text+0x225): In function `process_attach': /cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main.c:110: undefined reference to `_DOSMEM_MapDosToLinear' kernel_main.o(.text+0x249):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:110: undefined reference to `_GLOBAL_CreateBlock' kernel_main.o(.text+0x260):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:110: undefined reference to `_NE_SetEntryPoint' kernel_main.o(.text+0x26c):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:111: undefined reference to `_DOSMEM_MapDosToLinear' kernel_main.o(.text+0x290):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:111: undefined reference to `_GLOBAL_CreateBlock' kernel_main.o(.text+0x2a7):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:111: undefined reference to `_NE_SetEntryPoint' kernel_main.o(.text+0x2b3):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:112: undefined reference to `_DOSMEM_MapDosToLinear' kernel_main.o(.text+0x2d7):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:112: undefined reference to `_GLOBAL_CreateBlock' kernel_main.o(.text+0x2ee):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:112: undefined reference to `_NE_SetEntryPoint' kernel_main.o(.text+0x2fa):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:113: undefined reference to `_DOSMEM_MapDosToLinear' kernel_main.o(.text+0x31e):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:113: undefined reference to `_GLOBAL_CreateBlock' kernel_main.o(.text+0x335):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:113: undefined reference to `_NE_SetEntryPoint' kernel_main.o(.text+0x341):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:114: undefined reference to `_DOSMEM_MapDosToLinear' kernel_main.o(.text+0x365):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:114: undefined reference to `_GLOBAL_CreateBlock' kernel_main.o(.text+0x37c):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:114: undefined reference to `_NE_SetEntryPoint' kernel_main.o(.text+0x388):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:115: undefined reference to `_DOSMEM_MapDosToLinear' kernel_main.o(.text+0x3ac):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:115: undefined reference to `_GLOBAL_CreateBlock' kernel_main.o(.text+0x3c3):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:115: undefined reference to `_NE_SetEntryPoint' kernel_main.o(.text+0x3ca):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:116: undefined reference to `_DOSMEM_0000H' kernel_main.o(.text+0x3de):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:116: undefined reference to `_NE_SetEntryPoint' kernel_main.o(.text+0x3e5):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:117: undefined reference to `_DOSMEM_BiosSysSeg' kernel_main.o(.text+0x3f9):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:117: undefined reference to `_NE_SetEntryPoint' kernel_main.o(.text+0x400):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:118: undefined reference to `_DOSMEM_BiosDataSeg' kernel_main.o(.text+0x414):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:118: undefined reference to `_NE_SetEntryPoint' kernel_main.o(.text+0x41b):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:119: undefined reference to `_DOSMEM_BiosSysSeg' kernel_main.o(.text+0x42f):/cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main .c:119: undefined reference to `_NE_SetEntryPoint' kernel_main.o(.text+0x471): In function `MAIN_KernelInit': /cygdrive/g/src/wine-dev/wine/dlls/kernel/kernel_main.c:160: undefined reference to `_WriteOutProfiles16@0' locale.o(.text+0x2792): In function `LOCALE_Init': /cygdrive/g/src/wine-dev/wine/dlls/kernel/locale.c:1012: undefined reference to `_CODEPAGE_Init' thunk.o(.text+0x4ab): In function `_loadthunk': /cygdrive/g/src/wine-dev/wine/dlls/kernel/thunk.c:164: undefined reference to `_ NE_GetOrdinal' thunk.o(.text+0x515): In function `_loadthunk': /cygdrive/g/src/wine-dev/wine/dlls/kernel/../../include/wine/winbase16.h:402: un defined reference to `_NE_GetEntryPointEx' thunk.o(.text+0x1c82): In function `IsPeFormat16': /cygdrive/g/src/wine-dev/wine/dlls/kernel/thunk.c:1115: undefined reference to ` _OpenFile16@12' thunk.o(.text+0x1ca8):/cygdrive/g/src/wine-dev/wine/dlls/kernel/thunk.c:1117: un defined reference to `__llseek16@12' thunk.o(.text+0x1cc2):/cygdrive/g/src/wine-dev/wine/dlls/kernel/thunk.c:1118: un defined reference to `__lread16@12' thunk.o(.text+0x1d0b):/cygdrive/g/src/wine-dev/wine/dlls/kernel/thunk.c:1120: un defined reference to `__llseek16@12' thunk.o(.text+0x1d28):/cygdrive/g/src/wine-dev/wine/dlls/kernel/thunk.c:1121: un defined reference to `__lread16@12' thunk.o(.text+0x2531): In function `C16ThkSL': /cygdrive/g/src/wine-dev/wine/dlls/kernel/thunk.c:1368: undefined reference to ` ___wine_call_from_16_thunk' thunk.o(.text+0x2729): In function `C16ThkSL01': /cygdrive/g/src/wine-dev/wine/dlls/kernel/thunk.c:1425: undefined reference to ` ___wine_call_from_16_thunk' thunk.o(.text+0x2b8d): In function `THUNK_AllocLSThunklet': /cygdrive/g/src/wine-dev/wine/dlls/kernel/thunk.c:1592: undefined reference to ` _TASK_GetPtr' thunk.o(.text+0x2c85): In function `THUNK_AllocSLThunklet': /cygdrive/g/src/wine-dev/wine/dlls/kernel/thunk.c:1626: undefined reference to ` _TASK_GetPtr' thunk.o(.text+0x3341): In function `CBClientThunkSL': /cygdrive/g/src/wine-dev/wine/dlls/kernel/thunk.c:1894: undefined reference to ` _CALL32_CBClient' thunk.o(.text+0x33b6): In function `CBClientThunkSLEx': /cygdrive/g/src/wine-dev/wine/dlls/kernel/thunk.c:1910: undefined reference to ` _CALL32_CBClientEx' wowthunk.o(.text+0xc4): In function `K32WOWGetVDMPointer': /cygdrive/g/src/wine-dev/wine/dlls/kernel/wowthunk.c:92: undefined reference to `_DOSMEM_MapRealToLinear' wowthunk.o(.text+0x3c4): In function `K32WOWHandle32': /cygdrive/g/src/wine-dev/wine/dlls/kernel/wowthunk.c:238: undefined reference to `_TASK_GetPtr' wowthunk.o(.text+0x5b4): In function `K32WOWHandle16': /cygdrive/g/src/wine-dev/wine/dlls/kernel/wowthunk.c:279: undefined reference to `_THREAD_IdToTEB' wowthunk.o(.text+0x6ec): In function `GetVDMPointer32W16': /cygdrive/g/src/wine-dev/wine/dlls/kernel/wowthunk.c:341: undefined reference to `_GlobalHandle16@4' wowthunk.o(.text+0x6fa):/cygdrive/g/src/wine-dev/wine/dlls/kernel/wowthunk.c:341 : undefined reference to `_GlobalPageLock16@4' wowthunk.o(.text+0x7ac): In function `LoadLibraryEx32W16': /cygdrive/g/src/wine-dev/wine/dlls/kernel/wowthunk.c:373: undefined reference to `_DIR_SearchPath' wowthunk.o(.text+0x225): In function `K32WOWYield16': /cygdrive/g/src/wine-dev/wine/dlls/kernel/wowthunk.c:195: undefined reference to `_Yield16@0' wowthunk.o(.text+0x23e): In function `K32WOWDirectedYield16': /cygdrive/g/src/wine-dev/wine/dlls/kernel/wowthunk.c:208: undefined reference to `_DirectedYield16@4' collect2: ld returned 1 exit status dllwrap: gcc exited with status 1 make: *** [kernel32.dll] Error 1