On 19 May 2012 18:22, Amittai Aviram wrote: > > - Defined domp_malloc (and associated routines) in a new file, domp_malloc.c, in libgomp > - Added domp_malloc to libgomp.map, in the list at the top of the OMP 1.0 block with label "global" > - Added domp_malloc.c to libgomp/Makefile.am, reconfigured GCC, and rebuilt--with language support for C, C++, and Fortran. > > When I build an OpenMP program in C, using my altered GCC C compiler (gcc), everything works fine: the linker finds the definition of domp_malloc. However, if I write a C++ program that calls domp_malloc, and try to build it with my special g++, the linker cannot find the definition of domp_malloc, so my build fails. What else can I do to make domp_malloc visible to the C++ linker? You shouldn't need to do anything. What's the linker error? How are you declaring domp_malloc in the C++ program? Is it a name-mangling issue, such that the C++ program is looking for extern "C++" void* domp_malloc(size_t) but the library defines extern "C" void* malloc?