On 19 May 2012 19:09, Amittai Aviram wrote:
> Aha! It's declared as
> void * domp_malloc(size_t);
> in a header I #include into my program--but I had forgotten to mark that #include as "extern 'C'." I just tried that and it works!--
>
> extern "C" {
> #include domp_defs.h
> }
>
> So this turned out not to be a GCC issue but just my lack of practice in mixing C and C++ code. Thank you so much for the hint!
Thought so :-)
It's better to make the header self-sufficient:
#ifdef __cplusplus
extern "C" {
#endif
void * domp_malloc(size_t);
#ifdef __cplusplus
extern "C" {
#endif
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]