刚刚添加新结构后的未定义引用

时间:2019-03-25 13:15:47

标签: c++ qt

我刚将一个结构移到另一个子项目的一部分的类中。那些已经通过以下方式成功连接的项目:

ScipioAI-Mind.pro:

INCLUDEPATH += $$PWD/../ScipioAI-core //the project which provides the class with struct

在执行此操作之前,它肯定可以正常工作,但是现在出现以下错误:

/usr/bin/ld: /root/Desktop/SCIEBO/C++/ScipioAI/build-ScipioAI-core-Desktop-Debug/ScipioAI-Console/../ScipioAI-Mind//libScipioAI-Mind.so: undefined reference to `auxalary::FadeObj<int>::FadeObj(bool, int)'

/usr/bin/ld: /root/Desktop/SCIEBO/C++/ScipioAI/build-ScipioAI-core-Desktop-Debug/ScipioAI-Console/../ScipioAI-Mind//libScipioAI-Mind.so: undefined reference to `operator==(auxalary::FadeObj<bool>, auxalary::FadeObj<bool>)'

/usr/bin/ld: /root/Desktop/SCIEBO/C++/ScipioAI/build-ScipioAI-core-Desktop-Debug/ScipioAI-Console/../ScipioAI-Mind//libScipioAI-Mind.so: undefined reference to `operator==(auxalary::FadeObj<int>, auxalary::FadeObj<int>)'

/usr/bin/ld: /root/Desktop/SCIEBO/C++/ScipioAI/build-ScipioAI-core-Desktop-Debug/ScipioAI-Console/../ScipioAI-Mind//libScipioAI-Mind.so: undefined reference to `auxalary::FadeObj<char>::FadeObj(bool, char)'

/usr/bin/ld: /root/Desktop/SCIEBO/C++/ScipioAI/build-ScipioAI-core-Desktop-Debug/ScipioAI-Console/../ScipioAI-Mind//libScipioAI-Mind.so: undefined reference to `operator==(auxalary::FadeObj<char>, auxalary::FadeObj<char>)'

/usr/bin/ld: /root/Desktop/SCIEBO/C++/ScipioAI/build-ScipioAI-core-Desktop-Debug/ScipioAI-Console/../ScipioAI-Mind//libScipioAI-Mind.so: undefined reference to `auxalary::FadeObj<bool>::FadeObj(bool, bool)'

FadeObj是结构,辅助是包含它的类。 auxalary在核心项目中,而之前包含fadeobj的类在-mind项目中。 即使阅读了一些有关undefined reference错误的信息,我也不知道在哪里寻找哪种错误。 :/

0 个答案:

没有答案