This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Q: should it work?


> > I suppose this depends on what limitations you have encountered.
>> 
>> I'll try to summarize here :
>> - Recompiled Shaun's stuff (Mandriva is RPM based, not DEB)
>> - I've been able to create and run GUI apps, but I had to work around
>>   having WinMain() and no main() by still having an empty main()
>>   function but telling the compiler to use _WinMain as the entry point
>>   of the executable (gcc -e_WinMain)
>
>That may be better than what I had to do:
>
>#ifdef __GNUC__
>int
>main()
>{
>    return WinMain( GetModuleHandle(NULL), 0, 
>#if defined TARGET_OS_WINCE
>                    GetCommandLineW(), 
>#elif defined TARGET_OS_WIN32
>                    GetCommandLineA(), 
>#endif
>                    SW_SHOWDEFAULT );
>}
>#endif
>
>>   I'd like to replace this by something more sensible.
>
>WinMain should be an acceptable entrypoint out-of-the box, without
>any special flags to gcc.  MinGW already allows this.

cegcc-0.0.2 knows this too already.

>> - I built include files based on the ones I found on my system from
>>   wine. I've really taken over most of the wine files except where I
>>   got in trouble using them, and edited them somewhat.
>>   An example is that the TabCtrl_XX() macros all map to SendMessageA()
>>   which is wrong for CE, it should use SendMessageW().
>
>Yep.  I posted to the mingw list back in January explaining that
>pocketpc dev tools were using their headers and needed some changes
>and asking if they'd prefer that we submit patches or fork.  They were
>enthusiastic in prefering the first.  I then submitted a patch
>following their directions and nobody was even assigned to it for a
>month.  It's not a priority for them because there are so few PPC
>developers using their stuff.  Maybe if more of us complain... :-)
>
>The patch is here:
>http://sourceforge.net/tracker/index.php?func=detail&aid=1426209&group_id=2435&atid=302435
>
>I just did a cvs-update on the mingw include sources I've modified,
>and there are no conflicts.  I think this means the patch will still 
>apply cleanly.
>
>
>> - I used Shauns SDK and extended it to generate libaygshell.a,
>>   libcomctrl.a and libfileopen.a on a 'need to have' basis.
>>   I'm not sure what I'm doing here but some things appear to work.
>
>I've already done this for the most recent version of the pocketpc-sdk
>.deb.  And my mingw patch adds the necessary headers.

This is great, In porting Qt4 I used MSFT's headers. I planned on using mingw's
headers, but never got into it. Currently I use a scheme like:

windows.h
---------------
#ifndef blabla_h
#define blabla_h
#include "fixmsheaders.h"
#include_next "Windows.h"
#endif

in which the fixmsheaders.h fixed most things to have gcc eat the msfts headers.

Then in applicaion, I add the sdk's include file dir as -dirafter.

Of course, mingw headers would be much better.


> > - I don't have a debugger
> 
> That sucks most of all!  It's pretty easy to keep code working on both
> win32 and ppc to use whatever debugging Wine provides, but I do wonder
> if I could have developed this app from scratch without eVC.  Most of
> my code is cross-platform, so I can debug it on Linux or Palm where I
> have gdb, but for some issues logfile-based debugging is a very slow
> process.  Oh, and an emulator would be nice too. :-)

In cegcc-0.0.2 you will find gdb and a gdb-stub. Currently they depend on
Rapi, so I've only tested them on cygwin. It should be possible to reuse 
the Rapi implementation from the synce project. Rapi is mostly used to upload
the stub and the target files to the device. The rest is socket communications.

Cheers,
Pedro Alves

__________________________________________________________
Para grandes mails, grandes contas
Portugalmail: 2 000 MB de espaço
http://www.portugalmail.pt/2000mb


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]