|
From: Edward D. <eld...@tr...> - 2010-09-27 14:11:14
|
On 9/27/2010 10:33 AM, JonY wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 9/27/2010 13:29, Edward Diener wrote: >> Using MingW with gcc 4.5.0-1 the linker gives me the message: >> >> "c:/utilities/mingwcurrent/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: >> warning: auto-importing has been activated without --enable-auto-import >> specified on the command line.This should work unless it involves >> constant data structures referencing symbols from auto-imported DLLs." >> >> I am not aware of doing anything to activate auto-importing in my gcc >> command line, which automatically invokeds the linker since I am not >> using the -c option. >> >> How do i get rid of this warning message ? >> > > Hi, > > You should use proper dllimport attributes with your codes, but if you > are lazy, you can just add -Wl,--enable-auto-import when linking. My experience with __declspec(dllimport) with VC++ is that a header file automatically dllimports whatever is necessary when using a dll. Thta is why I am not used to doing it manually. In my simple code, where the warning is occurring, I am only using C++ standard library functionality and no 3rd party libraries. Adding -Wl,--enable-auto-import removed the warning. > > With the latter, you may run afoul if you have data dllimported, I'm not > too clear what else you may encounter. > > With a recent binutils from cvs (2.20.51 series), you can safely ignore > this warning. Good, I am using binutils 2.20.51. > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.16 (MingW32) > > iEYEARECAAYFAkygq0YACgkQp56AKe10wHe6ugCggT94REOSVnBt4A+EvyR8jD+b > D4QAni4+EIcY9oFF5YABkNNc7YggM7fC > =F8/r > -----END PGP SIGNATURE----- > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > MinGW-users mailing list > Min...@li... > > This list observes the Etiquette found at > http://www.mingw.org/Mailing_Lists. > We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated. > > _______________________________________________ > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > |