Ogre.Next 2.3.3 linux application linking libraries

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
User avatar
jordiperezarti
Gnoblar
Posts: 23
Joined: Sun Sep 01, 2024 7:50 pm

Ogre.Next 2.3.3 linux application linking libraries

Post by jordiperezarti »

I have built Ogre-Next 2.3.3 for linux, i am using the RenderSystem_GL3Plus.

I can see, when running, the first config dialog asking for chooce the rendersystem in plugins.cfg

When i add the rendersystem i get OpenGL unresolved references in the link process.

These are the libs i am linking:

LIBS += -lOgreOverlayStatic -lOgreMainStatic -lRenderSystem_GL3PlusStatic
LIBS += -lPlugin_ParticleFXStatic -lOgreSceneFormatStatic
LIBS += -lOgreHlmsPbsStatic -lOgreHlmsUnlitStatic

LIBS += -lfreeimage-3.18.0 -lzzip
LIBS += -lGLX -lGL

LIBS += -lxcb -lX11 -lXt -lXrandr -lXaw7

I have 24 link errors about references missing, example:
error: /usr/local/lib/OGRE//libRenderSystem_GL3PlusStatic.a(OgreGL3PlusUavBufferPacked.cpp.o): in function Ogre::GL3PlusUavBufferPacked::~GL3PlusUavBufferPacked()':
OgreGL3PlusUavBufferPacked.cpp :undefined reference to
Ogre::UavBufferPacked::UavBufferPacked()'

Can you tell to me which lib is missing to link these chainn of references?

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5429
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1337

Re: Ogre.Next 2.3.3 linux application linking libraries

Post by dark_sylinc »

It sounds like it's complaining about a class destructor that is found in OgreMainStatic.

Linking in Linux is order-dependent, so I suspect you must declare -lOgreMainStatic last instead of first.

User avatar
jordiperezarti
Gnoblar
Posts: 23
Joined: Sun Sep 01, 2024 7:50 pm

Re: Ogre.Next 2.3.3 linux application linking libraries

Post by jordiperezarti »

Got it! adding the OgreMain.so the last in the chainn; i didnt know this, nice to have!

Now i have the RenderSystem up, but when creating the window it is missing the window resolution:
code:

Code: Select all

root->getRenderSystem()->setConfigOption( "sRGB Gamma Conversion", "Yes" );
root->getRenderSystem()->setConfigOption( "Video Mode", "1920x1200" );

Window *window = root->initialise( true, "Ogre-Next Linux Build" );

log:

GL3PlusRenderSystem::_createRenderWindow "Ogre-Next Linux Build", 1920x0 fullscreen miscParams: FSAA=0 displayFrequency=60 Hz gamma=Yes vsync=No
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 1 (X_CreateWindow)
Value in failed request: 0x0

Seems i need to pass the window resolution, it is having 1920X0 and fails due the 0 height.

Do you have the point to correct this?
thanks.

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5429
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1337

Re: Ogre.Next 2.3.3 linux application linking libraries

Post by dark_sylinc »

Try adding a space, e.g. "1920 x 1200".

Normally, this is filled automatically because window auto creation (root->initialise( true, ... )) expected you to have already called:

Code: Select all

if( mAlwaysAskForConfig || !mRoot->restoreConfig() )
{
	if( !mRoot->showConfigDialog() )
	{
	   // handle error;
	}
}

However you can create the window yourself and avoid that. See createRenderWindow in GraphicsSystem::initialize (GraphicsSystem.cpp).

User avatar
jordiperezarti
Gnoblar
Posts: 23
Joined: Sun Sep 01, 2024 7:50 pm

Re: Ogre.Next 2.3.3 linux application linking libraries

Post by jordiperezarti »

I am trying to create the window manually,

Code: Select all

      window = renderSystemGL3->_createRenderWindow("Ogre-Next Linux Build", 1920, 1080, false);

seems to work.