I'm trying to use a makefile to compile a program someone else has written, using cygwin. I get a lot of error messages, of which many complain error: template with C linkage
.
After searching around for a bit it seems the problem is connected to extern "C"
. This line is contained in the file cygwin/usr/include/pthread.h, which is included with #include < pthread.h >
in one of the headers. And when I remove this line most of the error messages disappear. But there are a few left, of the following sort:
/usr/include/pthread.h:67:5: error: previous declaration of ‘int pthread_atfork(void (* )(),void ( *)(), void ( *)())’ with ‘C++’ linkage
/usr/include/sys/unistd.h:136:5: error: conflicts with new declaration with ‘C’ linkage
Does anyone know how to fix this? I would love to sit down and learn all this stuff in detail but I don't have time before I need this program running..