2012-03-26 3 views
2

J'essaie de compiler sur Linux le fichier au http://sourceforge.net/projects/desr/files/Release/desr-0.9.tgz/download. Lorsque j'exécute ./configure, tout fonctionne correctement, jusqu'à ce que je tape make.comment résoudre un problème de versionnage lors de la compilation du code C++?

Puis-je obtenir les erreurs suivantes:

In file included from ./string.h:33, 
       from HtmlTokenizer.cpp:24: 
/usr/include/c++/4.4/cstring:76: error: ‘::memchr’ has not been declared 
/usr/include/c++/4.4/cstring:77: error: ‘::memcmp’ has not been declared 
/usr/include/c++/4.4/cstring:78: error: ‘::memcpy’ has not been declared 
/usr/include/c++/4.4/cstring:79: error: ‘::memmove’ has not been declared 
/usr/include/c++/4.4/cstring:80: error: ‘::memset’ has not been declared 
/usr/include/c++/4.4/cstring:81: error: ‘::strcat’ has not been declared 
/usr/include/c++/4.4/cstring:82: error: ‘::strcmp’ has not been declared 
/usr/include/c++/4.4/cstring:83: error: ‘::strcoll’ has not been declared 
/usr/include/c++/4.4/cstring:84: error: ‘::strcpy’ has not been declared 
/usr/include/c++/4.4/cstring:85: error: ‘::strcspn’ has not been declared 
/usr/include/c++/4.4/cstring:86: error: ‘::strerror’ has not been declared 
/usr/include/c++/4.4/cstring:87: error: ‘::strlen’ has not been declared 
/usr/include/c++/4.4/cstring:88: error: ‘::strncat’ has not been declared 
/usr/include/c++/4.4/cstring:89: error: ‘::strncmp’ has not been declared 
/usr/include/c++/4.4/cstring:90: error: ‘::strncpy’ has not been declared 
/usr/include/c++/4.4/cstring:91: error: ‘::strspn’ has not been declared 
/usr/include/c++/4.4/cstring:92: error: ‘::strtok’ has not been declared 
/usr/include/c++/4.4/cstring:93: error: ‘::strxfrm’ has not been declared 
/usr/include/c++/4.4/cstring:94: error: ‘::strchr’ has not been declared 
/usr/include/c++/4.4/cstring:95: error: ‘::strpbrk’ has not been declared 
/usr/include/c++/4.4/cstring:96: error: ‘::strrchr’ has not been declared 
/usr/include/c++/4.4/cstring:97: error: ‘::strstr’ has not been declared 

Toutes les idées ce qui pourrait être le problème?

Voici g ++ --version:

g++ (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3 
Copyright (C) 2009 Free Software Foundation, Inc. 
This is free software; see the source for copying conditions. There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

Répondre

3

Quand il y a

#include <cstring> 

le compilateur g ++ devrait mettre les déclarations qu'elle se comprend dans le std :: Et les espaces de noms mondiaux. Il semble que ce soit pour une raison quelconque. Essayez de remplacer une instance de strcpy par std :: strcpy.

+0

Le Makefile pourrait être l'alimentation d'un drapeau du compilateur qui évite l'inclusion de la norme comprennent des chemins. – enobayram

3

J'ai fait face à un problème similaire. Dans mon cas, l'ordre d'inclusion de fichiers d'en-tête sont les suivants

#include <string> // for string class 
#include <cstring> // for memcpy() 

Avec cela, je suis tombé sur des erreurs ci-dessus que vous mentionnez avec gcc 4.6.3.

Changement de l'ordre comprend travaillé ..

Questions connexes