This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How do I add missing stdc functions to libstdc++-v3?


On 2012-03-15, at 4:38 AM, Jonathan Wakely wrote:

> On 15 March 2012 06:32, Marc Glisse wrote:
>> On Wed, 14 Mar 2012, Vaugha Brewchuk wrote:
>> 
>>> /bin/ld: Undefined symbols:
>>> access(char const*, int)
>>> strdup(char const*)
>>> strxfrm(char*, char const*, unsigned long)
>>> collect2: ld returned 1 exit status
>> 
>> 
>> It is suspicious that you get the types of the arguments printed here. It
>> means the functions were compiled as C++ functions, so probably their
>> declaration is missing extern "C".
> 
> Indeed, check in the relevant libc headers, <unistd.h> and <string.h>
> to see if the headers are enclosed in:
> 
> #ifdef __cplusplus
> extern "C" {
> #endif
> ...
> #ifdef __cplusplus
> }
> #endif
> 
> If none of the NeXT headers have that, there's a compiler setting that
> forces all headers in system directories such as /usr/include to be
> implicitly treated as though they had that extern "C" linkage.

BINGO - that did it!  Thank you!  I am also very rapidly coming to a realization that trying to port g++ while not knowing anything about c++ is a silly idea...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]