[OpenIndiana-discuss] undefined symbol __gnu_cxx::__pool<true>::_M_reserve_block(unsigned int, unsigned int)
James Carlson
carlsonj at workingcode.com
Tue Nov 5 16:41:03 UTC 2013
On 11/05/13 10:56, Apostolos Syropoulos wrote:
>
>>
>> /*
>> * Need to provide proper symbol names in case this library is used by
>>
>> * C++.
>> */
>> #ifdef __cplusplus
>> extern "C" {
>> #endif
>> ...
>> #ifdef __cplusplus
>> }
>> #endif
>>
>
>
> Indeed, that was the error. I added the two delimiters and recompiled the modules
> that used the specific header and yes the linker had no problem. This was an
> obvious error but if it is so obvious I wonder how people manage to compile
> things under Linux?
Dunno. I suppose it's possible that this library is compiled as C++
there and thus the objects are built with C++ mangled names. That'd be
pretty annoying architecturally, but if the only consumers are written
in C++, it wouldn't really matter.
I've never used the application (or Qt itself for that matter) on Linux.
In any event, the linker doesn't know anything about this; it just
matches up symbol names, and fails if it can't do that. The fact that a
C++ compiler (any C++ compiler) normally gives the linker really weird
names to use is something that C++ users just have to live with. :-/
> Thanks for your help and your assistance!
No problem; glad to hear it's working.
--
James Carlson 42.703N 71.076W <carlsonj at workingcode.com>
More information about the OpenIndiana-discuss
mailing list