LINUX.ORG.RU

G++ 4.7.0~, x86_64-pc-solaris2.11: conflicts with new declaration with 'C++' linkage


0

1

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51670

In file included from /usr/include/stdlib.h:32:0,
                 from /usr/include/c++/4.7/cstdlib:66,
                 from test.cpp:1:
/usr/include/iso/stdlib_iso.h:129:14: error: previous declaration of ‘void* std::bsearch(const void*, const void*, std::size_t, std::size_t, int (*)(const void*, const void*))’ with ‘C’ linkage
/usr/include/iso/stdlib_iso.h:134:38: error: conflicts with new declaration with ‘C++’ linkage
/usr/include/iso/stdlib_iso.h:147:61: error: conflicting declaration ‘const char* restrict’
/usr/include/iso/stdlib_iso.h:147:33: error: ‘restrict’ has a previous declaration as ‘wchar_t* restrict’
/usr/include/iso/stdlib_iso.h:149:56: error: conflicting declaration ‘const char* restrict’
/usr/include/iso/stdlib_iso.h:149:28: error: ‘restrict’ has a previous declaration as ‘wchar_t* restrict’
/usr/include/iso/stdlib_iso.h:150:13: error: previous declaration of ‘void std::qsort(void*, std::size_t, std::size_t, int (*)(const void*, const void*))’ with ‘C’ linkage

и т. д.


Вопрос снялся запуском /usr/lib/gcc/x86_64-pc-solaris2.11/4.7/install-tools/mkheaders

Это скрипт создал все необходимые файлы в /usr/lib/gcc/x86_64-pc-solaris2.11/4.7/include-fixed/

r2d2 ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.