c++ - 编译 Sundance-4.73

标签 c++ gcc compiler-construction sundance

我正在使用 gcc 3.4.6 编译 Sundance-4.37。 SUNDANCE(Sentence UNDerstanding AND Concept Extraction)和autoannotate是犹他大学NLP实验室开发的软件。圣丹斯电影节预包装有 OpinionFinder .

它是使用安装脚本编译的。编译时,抛出如下错误:

creating ../src/Makefile
g++ -Wall -Wno-deprecated -pipe -g -static -I../include -DHOME=\"/home/shahw/opinionfinder/software/sundance-4.37/\" -c -fPIC -o shared/activation.o activation.C
constituent.h:131: error: extra qualification ‘Constituent::’ on member ‘getWordhelper’
make: *** [shared/activation.o] Error 1

constituent.h 的第 130-132 行是:

protected:
  Word* Constituent::getWordhelper(unsigned int&, unsigned int) const;
};

如有任何提示,我们将不胜感激。

最佳答案

您不使用类名作为类内部成员函数的前缀,只要在外部定义它们即可。只需删除该前缀即可。

protected:
    Word* getWordhelper(unsigned int&, unsigned int) const;
};

关于c++ - 编译 Sundance-4.73,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6313426/

相关文章:

c++ - 共享对象(.so)静态链接并打开其他共享对象,它们之间是否共享静态库代码?

c++ - 对齐坐标系

c++ - 如何修复 "The Procedure entry point SDL_ceilf could not be located in the dynamic link library"

c++ - libstdc++ std::throw_with_nested() 需要多态类型

python - 如何将所有资源编译成一个可执行文件?

c - 未定义的函数引用

c++ - 为什么 VC++ C4150(删除指向不完整类型的指针)只是一个警告?

c++ - 增加访问量可能存在错误

c++ - 查找前K个频繁词

c++ - -fPIC 仅适用于共享库吗?