Thanks for supplying a hyperlink to __attribute__ documentation, but how does that answer my question?

I try using combinations of #pragma weak, _Pragma weak, and __declspec(weak) to achieve the same effect as __attribute__((weak)) with GCC/MinGW in Windows, but none of them compile.

Cheers,

Andrew Pennebaker
www.yellosoft.us


On Wed, Sep 12, 2012 at 5:37 PM, LRN <lrn1986@gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 13.09.2012 0:03, Andrew Pennebaker wrote:
>> I love how you can bundle a framework and CLI in the same Perl
>> script, by using unless(caller) { main; }. For lack of a better
>> name, I've started calling this behavior
>> scriptedmain<https://github.com/mcandre/scriptedmain/tree/master/perl>
>>
>>
> .
>>
>> I want to be able to do the same thing in C, and with help from
>> StackOverflow I've gotten working C code to do just that, in Unix.
>> Unfortunately, the C
>> code<http://stackoverflow.com/questions/12395130/trouble-using-scriptedmain-in-mingw>
>>
>>
> doesn't
>> compile in Windows, because gcc/MinGW and gcc/Strawberry Perl fail
>> to recognize __attribute__((weak)) syntax. Is there another way I
>> can rewrite my code for MinGW's gcc so that it compiles and works
>> like the Perl scriptedmain? Or can we add __attribute__((weak)) to
>> MinGW's gcc lexicon?
>>
>> I will also be asking the Strawberry Perl project about their gcc
>> in case some minor configuration tweak can get this working.
>>
> See [1].
>
>
> [1]
> http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#index-g_t_0040code_007bweak_007d-attribute-2675
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (MingW32)
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJQUQCrAAoJEOs4Jb6SI2CwU/wH/1egGOG5AuV8JHmuFHmdo6V8
> GvyHAKDTMhe68jw1i2xvEMGUZ68ic4AwI1E6XN5N1DQGL77GThEuSolJZM4NbjR6
> qxWitfv0PxH1djEhlD2Yl2eEtxWfjJtsgxGUUUyag5+I435oUt+YfklSeQNetRy5
> gefn2HY8wGpH5Q3ySOSgsF9F10lRTSpUJlZIkztR1UeuGggPgjficLNvOGDnlJCY
> D8yt1qMTKpB/5+2Q1ZjztTYoyK/lcWFR3CxDV6/zcwMlV/H2FruVad4aq26YBTst
> fHTSICYFRF5Owv+wqvyT0/OAEhEa9EzI+QwsNqUuIh5sWziCvBzGOjmD1xapMsE=
> =FRs3
> -----END PGP SIGNATURE-----
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> MinGW-users mailing list
> MinGW-users@lists.sourceforge.net
>
> 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
> Also: mailto:mingw-users-request@lists.sourceforge.net?subject=unsubscribe