Lou1
asked on
error LNK2019: unresolved external symbol "public: bool __thiscall
Hi all, I am working on a videogame being developed in C++. We use Ogre as our graphics engine.
I get the following error:
1>HostAPI.obj : error LNK2019: unresolved external symbol "public: bool __thiscall Star::ContainerManager::ob jectsInZon e(int,bool ,class Star::Container &,class std::vector<int,class std::allocator<int> > &)
Here is the portion of code in class HostAPI.cpp where the error occurs:
int allSuppliesInShelter(lua_S tate* pLuaState)
{
int zoneID = static_cast<int>(lua_tonum ber(pLuaSt ate,1));
Container& parentNode = *(Star::ContainerManager:: getSinglet on().getRo ot());
std::vector<int> objectTypes;
objectTypes.push_back(71);
bool allSuppliesInShelter = Star::ContainerManager::ge tSingleton ().objects InZone(zon eID, true, parentNode, objectTypes);
lua_pushboolean(pLuaState, true);
return 1;
} // End allSuppliesInShelter
The function objectsInZone is defined as Public in class ContainerManager as follows:
bool objectsInZone(int zoneID, bool allObjects, Container& parentNode, std::vector<int>& objectTypes)
{
ContainerMap::iterator contentsIterator;
for (contentsIterator = parentNode.getContents()-> begin(); contentsIterator != parentNode.getContents()-> end(); contentsIterator++)
{
Star::Logger::getSingleton Ptr()->log f(Star::Lo gger::LOG_ TRIVIAL, "The objectType of the object is %d", (contentsIterator->second) ->getObjec tType());
if ((contentsIterator->second )->getObje ctType() == 71)
{
//if (allObjects)
//{
// In case all objects of the types specified have to be in the zone.
//} // End if (allObjects)
} // End if ((contentsIterator->second )->getObje ctType() == 71)
} // End for
if (allObjects)
{
return true;
} // End if
else
{
return false;
} // End else
} // End objectsInZone
Class ContainerManager is included in HostAPI.cpp:
#include <ContainerManager/Containe rManager.h >
Does anybody know why this error could be occuring?
I get the following error:
1>HostAPI.obj : error LNK2019: unresolved external symbol "public: bool __thiscall Star::ContainerManager::ob
Here is the portion of code in class HostAPI.cpp where the error occurs:
int allSuppliesInShelter(lua_S
{
int zoneID = static_cast<int>(lua_tonum
Container& parentNode = *(Star::ContainerManager::
std::vector<int> objectTypes;
objectTypes.push_back(71);
bool allSuppliesInShelter = Star::ContainerManager::ge
lua_pushboolean(pLuaState,
return 1;
} // End allSuppliesInShelter
The function objectsInZone is defined as Public in class ContainerManager as follows:
bool objectsInZone(int zoneID, bool allObjects, Container& parentNode, std::vector<int>& objectTypes)
{
ContainerMap::iterator contentsIterator;
for (contentsIterator = parentNode.getContents()->
{
Star::Logger::getSingleton
if ((contentsIterator->second
{
//if (allObjects)
//{
// In case all objects of the types specified have to be in the zone.
//} // End if (allObjects)
} // End if ((contentsIterator->second
} // End for
if (allObjects)
{
return true;
} // End if
else
{
return false;
} // End else
} // End objectsInZone
Class ContainerManager is included in HostAPI.cpp:
#include <ContainerManager/Containe
Does anybody know why this error could be occuring?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
bool ContainerManager::objectsI