Res: Re: undefined reference to `errno' g++3.3
Eljay Love-Jensen
eljay@adobe.com
Thu Jul 31 14:51:00 GMT 2003
Hi Gabriel,
Then the problem lies in the Nhost_client.a code not being compiled correctly for your platform. Contact your vendor of that library.
BTW: the "errno" identifier could be a subroutine, to mutex protect the underlying variable from concurrent thread access. Or the "errno" idenitifer could be a subroutine that provides a thread-specific variable. Or the "errno" may just be an unprotected global int. Assuming that errno is an "extern "C" int errno;" is most unwise. Putting a "extern "C" { int errno = 0; }" in your own main.cpp code can cause an identifier collision where parts of the code may assume "errno" is a function, and others assume "errno" is a global, and that ain't pretty. I presume that "h_errno" is some sort of structure or perhaps a handle (a pointer to a pointer to something) -- one that I'm not familiar with.
--Eljay
More information about the Gcc-help
mailing list