[2.1] Undefined symbol: Ogre::HlmsPbs::HlmsPbs

Problems building or running the engine, queries about how to use features etc.
ven
Kobold
Posts: 35
Joined: Mon Sep 10, 2007 11:03 am
Location: St. Petersburg, Russia
x 1

[2.1] Undefined symbol: Ogre::HlmsPbs::HlmsPbs

Post by ven »

Question from this topic.

This code work (Unlit):

Code: Select all

Ogre::Archive * archiveLibrary = Ogre::ArchiveManager::getSingletonPtr()->load("./Media/Hlms/Common/GLSL", "FileSystem", true );
Ogre::ArchiveVec library;
library.push_back( archiveLibrary );

Ogre::Archive * archiveUnlit = Ogre::ArchiveManager::getSingletonPtr()->load("./Media/Hlms/Unlit/GLSL", "FileSystem", true );
Ogre::HlmsUnlit * hlmsUnlit = OGRE_NEW Ogre::HlmsUnlit( archiveUnlit, &library );
mOgreRoot.getHlmsManager()->registerHlms( hlmsUnlit );
if replace the last three lines with this (replace all Unlit with Pbs):

Code: Select all

Ogre::Archive * archivePbs = Ogre::ArchiveManager::getSingletonPtr()->load("./Media/Hlms/Pbs/GLSL", "FileSystem", true );
Ogre::HlmsPbs * hlmsPbs = OGRE_NEW Ogre::HlmsPbs( archivePbs, &library );
mOgreRoot.getHlmsManager()->registerHlms( hlmsPbs );
Then I'll get: symbol lookup error: <AppName> undefined symbol: _ZN4Ogre7HlmsPbsC1EPNS_7ArchiveEPSt6vectorIS2_NS_12STLAllocatorIS2_NS_22CategorisedAllocPolicyILNS_14MemoryCategoryE0EEEEEE

Demangled name:

Code: Select all

Ogre::HlmsPbs::HlmsPbs(Ogre::Archive*, std::vector<Ogre::Archive*, Ogre::STLAllocator<Ogre::Archive*, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > >*)
ven
Kobold
Posts: 35
Joined: Mon Sep 10, 2007 11:03 am
Location: St. Petersburg, Russia
x 1

Re: [2.1] Undefined symbol: Ogre::HlmsPbs::HlmsPbs

Post by ven »

The symbol was found after add linking the library libOgreHlmsPbs.so.
It is unclear why there is no need for linking libOgreHlmsUnlit.so, and there is no recommendation for linking these libraries.