プロが教えるわが家の防犯対策術!

Cには詳しいのですが、C++があまりよくわかっておらず、質問させてください。
今回、手に入れたC++のあるプログラムをmakeしています(x86_64 Linux)。
以下のようなエラーが出てコンパイルできないのですが、何が悪いのか全く理解できず困っています。
他の環境ではコンパイルできているらしいので、わたしの環境の何が悪いのか、考えられることがありましたら、何でも書き込んでいただけると嬉しいです。
よろしくお願いします。

g++ -c -I../MathUtils -I../CommonUtils -DHAVE_ZLIB -DHAVE_BZLIB -fomit-frame-pointer -O2 -DFTYPE=float -Wall -Wsign-compare -Wpointer-arith -pedantic -DHAVE_PGPLOT -I. -DHAVE_FFTW -o analyse_image.o analyse_image.cpp
In file included from analyse_image.cpp:21:
Tools.h:16:15: warning: anonymous variadic macros were introduced in C99
analyse_image.cpp: In function ‘int main(int, char**)’:
analyse_image.cpp:114: error: ‘strcmp’ was not declared in this scope
analyse_image.cpp:205: error: ‘exit’ was not declared in this scope
analyse_image.cpp:209: error: ‘strstr’ was not declared in this scope
analyse_image.cpp:216: error: ‘exit’ was not declared in this scope
analyse_image.cpp:457: error: ‘strlen’ was not declared in this scope
make: *** [analyse_image.o] Error 1

A 回答 (1件)

ソースがないので断定できませんが、おそらくはヘッダのインクルード忘れかと思います。

    • good
    • 0
この回答へのお礼

さっそくのご回答、ありがとうございました。
いろいろと調べたところ、うまくコンパイルできる他機ではgccのバージョンが3.4であることがわかりました。
そこで、4.3から3.4にバージョンを下げたいのですが、どうすれば良いのでしょうか?
質問を仕切り直すことにします。

お礼日時:2008/09/24 23:40

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!