Linker problems with arm-wince, need help/info

Chad J gamerChad at
Tue Jun 20 14:53:31 PDT 2006

Pedro Alves wrote:
> One more thing.
> There is usually a #define USER_LABEL_PREFIX "_" or #define 
> in gcc/config/$arch/someheader.h. In cegcc it is defined as 
> Maybe that isn't being used in the D frontend and an '_' is preppended 
> unconditionally?

This seems to have saved the day!

In gcc/config/arm/wince-pe.h I added this code:

#undef  LIB_SPEC
#define LIB_SPEC \
   { "%{staticlibs:-lgcc -lstdc++ -lsupc++ -lc -lm -lwinsock} 
%{!staticlibs:-lcdll -lcdllimp} -lcoredll" }

// solve underscoring problems when linking

The LIB_SPEC stuff makes it link to the newlib libraries and such 
without the need of an external specfile - this saves anyone who wants 
to build this from having to do a bunch of xgcc trickery to get the 
thing to eat a specfile.

Apparently I'm not out of the woods yet though.  There are unresolved 
references still.  The linker's error output is attached.  It seems to 
be all Phobos stuff - it's calling functions that I don't think exist on 
WinCE.  For some reason those functions must be defined in the headers 
while not actually being implemented.  These are things like 
GetCurrentDirectory, which shouldn't exist since WinCE doesn't have the 
concept of a current working dir (AFAIK).  If I'm wrong about this, do 
let me know before I get too far in extending parts of phobos.

I'm probably going to try cegcc newlib now.  Hopefully it can fill in 
some of those undefined references.

Thanks for the massive help Pedro!  Your intervention just saved me many 
hours of pain and frustration :)
Thank you too David, for the initial help and your work on GDC!
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: linkErrors

More information about the D.gnu mailing list