gpt4 book ai didi

c++ - 未解析的外部符号?

转载 作者:行者123 更新时间:2023-11-30 03:09:36 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
What is an undefined reference/unresolved external symbol error and how do I fix it?

我不擅长阅读 C++ 错误,但显然未解析的外部符号意味着我正在使用的函数未定义。我得到的错误是...

1>WorldState.obj : error LNK2001: unresolved external symbol "public: class Brutal::GameObject * __thiscall Brutal::GameObjectManager::createObject<class Player>(class Ogre::Vector3,class Ogre::Quaternion,class Brutal::PropertyList,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??$createObject@VPlayer@@@GameObjectManager@Brutal@@QAEPAVGameObject@1@VVector3@Ogre@@VQuaternion@4@VPropertyList@1@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>C:\Users\Brett\Desktop\Factions Online\build\release\client\client.exe : fatal error LNK1120: 1 unresolved externals

这没有任何意义,因为 createObject 已定义,甚至当我右键单击它并单击“转到定义”时甚至会在 MSVC 中适当出现

我调用它的代码是...

Brutal::GameObjectManager::getSingletonPtr()->createObject<Player>(Ogre::Vector3::ZERO, Ogre::Quaternion::IDENTITY);

所以我是不是漏掉了什么愚蠢的东西?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com