I am trying to use a makefile to compile a program that someone wrote using cygwin. I get a lot of error messages, of which many complain error: template with C linkage .
After searching a bit, it seems the problem is with extern "C" . This line is contained in the cygwin / usr / include / pthread.h file, which is included in #include < pthread.h > in one of the headers. And when I delete this line, most error messages disappear. But there are several leftists, of the following form:
/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 like to sit down and study all this in detail, but I do not have time before I need this program.
c ++ c header-files extern
jorgen
source share