2012-03-26 5 views
2

私はLinuxでファイルをhttp://sourceforge.net/projects/desr/files/Release/desr-0.9.tgz/downloadにコンパイルしようとしています。C++コードをコンパイルするときのバージョン管理に関する問題を解決するにはどうすればよいですか?

私が./configureを実行すると、すべてがスムーズに動作します。問題になることができるもの

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 

任意のアイデア: は、それから私は、次のエラーを取得しますか?ここで

グラム++ --versionさ:

#include <cstring> 

グラムがある場合

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. 

答えて

3

++コンパイラは、それ自体がSTDに含まれる宣言::とグローバルな名前空間を配置する必要があります。あたかもそれをしていないかのように何らかの理由を探します。 strcpyのインスタンスをstd :: strcpyに置き換えてみてください。

+0

Makefileは、標準インクルードパスを含めることを避けるコンパイラフラグを与えている可能性があります。 – enobayram

3

私は同様の問題に直面しました。私の場合、これにより

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

を次のようにヘッダファイルのインクルードの順番があったが、私はあなたが、GCC 4.6.3で言及上記のエラーに遭遇しました。

作業の順序を変更する。

関連する問題