On Sat, 2007-06-23 at 20:11 -0600, Ximsce wrote:
> Unfortunately, I have another newbie-type question.  I am trying to 
> compile zip using arm-wince-cegcc-gcc so that I can use it as a 
> commandline tool.  When I got to the linking phase, there was an error 
> saying that -luser32 and -ladvapi32 could not be found.

Windows CE doesn't implement the same API as the desktop versions of
Windows; and they're packaged differently. Much of what I'd expect to be
system services are in coredll.dll on CE.

> After some 
> searching, I grabbed these libraries from the mingw32 project (I realize 
> doing so probably won't work once I put the application on the iPaq, but 
> I just wanted to see if I could get it to compile).

I am not sure of what you mean. Have you found binaries from Mingw ?
Then they're most likely compiled for an x86 processor which won't work
on your iPaq. Also I'd be surprised if you could link them.

> Well, the libraries 
> are found, but I get a bunch of "undefined reference" errors:
> 
> zip.o:zip.c:(.text+0x307c): undefined reference to `setmode'
> zipup.o:zipup.c:(.text+0x77c): undefined reference to `setmode'
> zipup.o:zipup.c:(.text+0x958): undefined reference to `_sopen'
> win32.o:win32.c:(.text+0x168): undefined reference to `GetConsoleMode'
> win32.o:win32.c:(.text+0x1ac): undefined reference to `SetConsoleMode'
> win32.o:win32.c:(.text+0x21c): undefined reference to `SetConsoleMode'

Actually I believe CE doesn't support some of these functions. The MSDN
docs I could find on GetConsoleMode appear to indicate that.

> win32.o:win32.c:(.text+0x26c): undefined reference to `GetFullPathNameW'
> win32.o:win32.c:(.text+0x2c0): undefined reference to 
> `GetVolumeInformationW'
> win32.o:win32.c:(.text+0x630): undefined reference to `_get_osfhandle'
> win32.o:win32.c:(.text+0x634): undefined reference to `GetFileType'
> win32.o:win32.c:(.text+0x664): undefined reference to `GetVersion'
> win32.o:win32.c:(.text+0x73c): undefined reference to 
> `DosDateTimeToFileTime'
> win32.o:win32.c:(.text+0x7e4): undefined reference to 
> `GetVolumeInformationW'
> win32.o:win32.c:(.text+0xbac): undefined reference to 
> `GetVolumeInformationW'
> nt.o:nt.c:(.text+0x74): undefined reference to `OpenProcessToken'
> nt.o:nt.c:(.text+0xe8): undefined reference to `LookupPrivilegeValueW'
> nt.o:nt.c:(.text+0x12c): undefined reference to `AdjustTokenPrivileges'
> nt.o:nt.c:(.text+0x15c): undefined reference to `LookupPrivilegeValueW'
> nt.o:nt.c:(.text+0x180): undefined reference to `AdjustTokenPrivileges'
> nt.o:nt.c:(.text+0x1fc): undefined reference to `lstrlenA'
> nt.o:nt.c:(.text+0x288): undefined reference to `CreateFileA'
> nt.o:nt.c:(.text+0x2a8): undefined reference to `GetKernelObjectSecurity'
> nt.o:nt.c:(.text+0x300): undefined reference to 
> `GetSecurityDescriptorLength'
> nt.o:nt.c:(.text+0x3fc): undefined reference to `GetVolumeInformationW'
> nt.o:nt.c:(.text+0x448): undefined reference to `lstrcpynA'
> nt.o:nt.c:(.text+0x52c): undefined reference to `GetDriveTypeW'
> nt.o:nt.c:(.text+0x564): undefined reference to `CreateFileA'
> nt.o:nt.c:(.text+0x58c): undefined reference to `GetKernelObjectSecurity'
> nt.o:nt.c:(.text+0x5e0): undefined reference to `GetKernelObjectSecurity'
> nt.o:nt.c:(.text+0x6c0): undefined reference to `CreateFileA'
> 
> Many of these appear to be methods that come out of the w32api or the 
> coredll.  Also, the first one, 'setmode', is used in some of the source 
> for cegcc, so I'm not sure why the linker can't find them here.

We have _setmode but no setmode in the coredll.def.

        Danny

>  The 
> command I'm using is:
> 
> arm-wince-cegcc-gcc -ozip.exe -s zip.o crypt.o ttyio.o zipfile.o zipup.o 
> fileio.o util.o crc32.o crctab.o globals.o deflate.o trees.o  win32.o 
> win32zip.o nt.o -luser32 -ladvapi32
> 
> Sorry for abusing the list with debug/compile questions like this; I 
> really appreciate your assistance, and hopefully I can figure out a way 
> to return the favor.
> 
> Ciao,
> Matt
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Cegcc-devel mailing list
> Cegcc-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cegcc-devel
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to