Problem compiling (error: ‘strcmp’ was not declared in this scope)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Problem compiling (error: ‘strcmp’ was not declared in this scope)
Here is my terminal log from the compile shell script:
================ Compiling MorphGen ===================
make: Entering directory `/home/#####/RML/Source/MorphGen'
g++ -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -MD -c -O3 -funroll-loops -fomit-frame-pointer -ftemplate-depth-35 MorphGen.cpp -o MorphGen.orst
In file included from ../LemmatizerLib/../MorphWizardLib/wizard.h:8,
from ../LemmatizerLib/StdMorph.h:12,
from MorphGen.cpp:7:
../LemmatizerLib/../MorphWizardLib/FormInfo.h: In member function ‘bool CLemmaInfo::operator==(const CLemmaInfo&) const’:
../LemmatizerLib/../MorphWizardLib/FormInfo.h:87: error: ‘strncmp’ was not declared in this scope
../LemmatizerLib/../MorphWizardLib/FormInfo.h: In member function ‘bool CLemmaInfo::operator<(const CLemmaInfo&) const’:
../LemmatizerLib/../MorphWizardLib/FormInfo.h:96: error: ‘strncmp’ was not declared in this scope
In file included from ../LemmatizerLib/MorphDictBuilder.h:9,
from MorphGen.cpp:10:
../LemmatizerLib/MorphDict.h: In member function ‘bool CMorphDict::IsLessMorphInterp::operator()(const CLemmaInfoAndLemma&, const char*) const’:
../LemmatizerLib/MorphDict.h:53: error: ‘strcmp’ was not declared in this scope
../LemmatizerLib/MorphDict.h: In member function ‘bool CMorphDict::IsLessMorphInterp::operator()(const char*, const CLemmaInfoAndLemma&) const’:
../LemmatizerLib/MorphDict.h:59: error: ‘strcmp’ was not declared in this scope
../LemmatizerLib/MorphDict.h: In member function ‘bool CMorphDict::IsLessMorphInterp::operator()(const CLemmaInfoAndLemma&, const CLemmaInfoAndLemma&) const’:
../LemmatizerLib/MorphDict.h:66: error: ‘strcmp’ was not declared in this scope
make: *** [MorphGen.orst] Error 1
make: Leaving directory `/home/#####/RML/Source/MorphGen'
======================
Error: cannot compile MorphGen
How do I get strcmp and strncmp included in this scope? Is the standard library not loading for some reason?
../LemmatizerLib/../MorphWizardLib/FormInfo.h: In member function ‘bool CLemmaInfo:perator<(const CLemmaInfo&) const’:
../LemmatizerLib/../MorphWizardLib/FormInfo.h:96: error: ‘strncmp’ was not declared in this scope
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.