* [Buildroot] Problem #including <string>
@ 2007-08-29 10:02 Will Wagner
2007-08-29 10:12 ` Carmelo AMOROSO
0 siblings, 1 reply; 4+ messages in thread
From: Will Wagner @ 2007-08-29 10:02 UTC (permalink / raw)
To: buildroot
Hello,
I have built buildroot with the attached config for x86, with support
for c++.
However whenever I include <string> I get errors in my code because it
seems somewhere in <string> it is #defining index.
If I attempt to compile the following code:
#ifdef index
#error foo
#endif
#include <string>
#ifdef index
#error bar
#endif
void do_nothing()
{
}
Then I get the second error.
I have tried searching through the headers to find where the #define
index is but I have been unable to find it. Can anyone suggest the best
way of locating where index is being erroneously defined?
Many thanks,
Will.
--
------------------------------------------------------------------------
Will Wagner will_wagner at carallon.com
Senior Project Engineer Office Tel: +44 (0)20 7371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config
Type: application/xml
Size: 14551 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20070829/aa8a1ec6/attachment-0001.xml
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] Problem #including <string>
2007-08-29 10:02 [Buildroot] Problem #including <string> Will Wagner
@ 2007-08-29 10:12 ` Carmelo AMOROSO
[not found] ` <46D573C8.7060701@carallon.com>
0 siblings, 1 reply; 4+ messages in thread
From: Carmelo AMOROSO @ 2007-08-29 10:12 UTC (permalink / raw)
To: buildroot
Will Wagner wrote:
> Hello,
>
> I have built buildroot with the attached config for x86, with support
> for c++.
>
> However whenever I include <string> I get errors in my code because it
> seems somewhere in <string> it is #defining index.
>
> If I attempt to compile the following code:
>
> #ifdef index
> #error foo
> #endif
>
> #include <string>
>
> #ifdef index
> #error bar
> #endif
>
> void do_nothing()
> {
> }
>
> Then I get the second error.
>
> I have tried searching through the headers to find where the #define
> index is but I have been unable to find it. Can anyone suggest the
> best way of locating where index is being erroneously defined?
>
> Many thanks,
>
> Will.
>
Probably you have uClibc built with SUSv3_MACRO defined (among these
there is index )
Cheers,
Carmelo
> ------------------------------------------------------------------------
>
> _______________________________________________
> buildroot mailing list
> buildroot at uclibc.org
> http://busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] Problem #including <string>
[not found] ` <46D573C8.7060701@carallon.com>
@ 2007-08-29 13:41 ` Carmelo AMOROSO
2007-09-01 16:34 ` Bernhard Fischer
0 siblings, 1 reply; 4+ messages in thread
From: Carmelo AMOROSO @ 2007-08-29 13:41 UTC (permalink / raw)
To: buildroot
Will Wagner wrote:
> Carmelo AMOROSO wrote:
>> Probably you have uClibc built with SUSv3_MACRO defined (among these
>> there is index )
>>
>> Cheers,
>> Carmelo
>>> ------------------------------------------------------------------------
>>>
>
> Thank you that fixed it. Why would you want the SUSv3_MACRO defined?
>
If some applications still call the legacy SUSv3 api, you may need
to enable this option within uClibc, anyway, just to avoid name clashing
when building some application (in your case), it's better to use
the function version of the SUSv3 api and not macros... (if cannot patch
the application)
but if you doesn't needs this interfaces, safely remove this support
from uClibc.
Carmelo
P.S.
CC the buildroot ML to get other feedbacks it is the case
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] Problem #including <string>
2007-08-29 13:41 ` Carmelo AMOROSO
@ 2007-09-01 16:34 ` Bernhard Fischer
0 siblings, 0 replies; 4+ messages in thread
From: Bernhard Fischer @ 2007-09-01 16:34 UTC (permalink / raw)
To: buildroot
On Wed, Aug 29, 2007 at 03:41:36PM +0200, Carmelo AMOROSO wrote:
>Will Wagner wrote:
>> Carmelo AMOROSO wrote:
>>> Probably you have uClibc built with SUSv3_MACRO defined (among these
>>> there is index )
>>>
>>> Cheers,
>>> Carmelo
>>>> ------------------------------------------------------------------------
>>>>
>>
>> Thank you that fixed it. Why would you want the SUSv3_MACRO defined?
You don't want UCLIBC_SUSV3_LEGACY_MACROS nor UCLIBC_SUSV3_LEGACY, as a
general rule of thumb.
>>
>If some applications still call the legacy SUSv3 api, you may need
>to enable this option within uClibc, anyway, just to avoid name clashing
>when building some application (in your case), it's better to use
>the function version of the SUSv3 api and not macros... (if cannot patch
>the application)
>
>but if you doesn't needs this interfaces, safely remove this support
>from uClibc.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-09-01 16:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-29 10:02 [Buildroot] Problem #including <string> Will Wagner
2007-08-29 10:12 ` Carmelo AMOROSO
[not found] ` <46D573C8.7060701@carallon.com>
2007-08-29 13:41 ` Carmelo AMOROSO
2007-09-01 16:34 ` Bernhard Fischer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox