From: <dan...@ya...> - 2004-01-13 20:05:29
|
--- Gisle Vanem <gv...@br...> wrote: > I have somthing like this in my code: > #include <ws2tcpip.h> > struct in6_addr ia6; > > ia6 = in6addr_any; > .. > > which doesn't work; ld says: > variable 'in6addr_any' can't be auto-imported. > > If I do > #include <ws2tcpip.h> > struct in6_addr *ia6; > > ia6 = &in6addr_any; > .. > > it works. How come? Is there some bug in relocating and contents > of structs? > Not really a bug, but a limitation of how linking to data dllimports works. The ld you are using is rather old. Update to recent version and search for auto-import in ld.info. The --enable-runtime-pseudo-reloc option should fix the problem. Danny > gcc version 3.3.1 (mingw special 20030804-1) > GNU ld version 2.13.90 20030111 > > --gv > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System offering > advanced branching capabilities and atomic changes on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users http://personals.yahoo.com.au - Yahoo! Personals New people, new possibilities. FREE for a limited time. |