2010/8/30 Chris Sutcliffe <[email protected]>:
> On 30 August 2010 10:42, Kai Tietz wrote:
>> 2010/8/30 Chris Sutcliffe <[email protected]>:
>>> Is it possible to override / change the default link order (i.e. is it
>>> in a config file somewhere), or is it hard coded at compile time?
>>
>> Well, this is a suggested default by gcc (IMHO we should change here
>> order, or teach ld to know dependencies odering of import-libraries).
>> But of course by using 'gcc -o myapp.exe my-object-files -ladvapi32'
>> forces that advapi32 library gets linked before the default one.
>
> One other thought I had was specifying '-nodefaultlibs', but I think
> that may be a little extreme, given:
>
> -nodefaultlibs
> Do not use the standard system libraries when linking. Only the
> libraries you specify will be passed to the linker, options specifying
> linkage of the system libraries, such as -static-libgcc or
> -shared-libgcc, will be ignored. The standard startup files are used
> normally, unless -nostartfiles is used. The compiler may generate
> calls to memcmp, memset, memcpy and memmove. These entries are usually
> resolved by entries in libc. These entry points should be supplied
> through some other mechanism when this option is specified.
>
> from the desciption, I would need to add -lgcc_s, etc. Is there a
> less extreme option to only override kernel32, advapi, etc.?
>
> Thank you,
>
> Chris
>
> --
> Chris Sutcliffe
> http://emergedesktop.org
> http://www.google.com/profiles/ir0nh34d
>
Well, this is a bit too much. Just make sure you specify on command
line (at end, or before -lkernel32 - if you specify it - the option
-ladvapi32. You can file a bug report for gcc, so I don't miss to
modify it for 4.6.
Kai
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public