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

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

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

Post by ven » Sun Feb 11, 2018 8:40 am

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> > >*)
0 x

ven
Kobold
Posts: 35
Joined: Mon Sep 10, 2007 11:03 am
Location: St. Petersburg, Russia

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

Post by ven » Mon Feb 12, 2018 5:22 pm

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.
0 x

Post Reply