Exception starting samples on macOS Topic is solved

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
jwwalker
Goblin
Posts: 224
Joined: Thu Aug 12, 2021 10:06 pm
Location: San Diego, CA, USA
x 17
Contact:

Exception starting samples on macOS

Post by jwwalker »

When I try to run any of the sample programs, I get this:

Code: Select all

An exception has occured: OGRE EXCEPTION(0:IOException): showConfigDialog is not supported on Emscripten in Root::showConfigDialog at /Volumes/Work/git-repos/ogre-next-fork/OgreMain/src/OgreRoot.cpp (line 631)

In Root::showConfigDialog, I see this:

Code: Select all

#if OGRE_PLATFORM == OGRE_PLATFORM_EMSCRIPTEN || defined( OGRE_CONFIG_UNIX_NO_X11 )
        OGRE_EXCEPT( Exception::ERR_CANNOT_WRITE_TO_FILE,
                     "showConfigDialog is not supported on Emscripten", "Root::showConfigDialog" );
#endif

In OgreBuildSettings.h, I do see that OGRE_CONFIG_UNIX_NO_X11 is defined. This seems reasonable to me, since macOS is a flavor of Unix that does not usually use X11, but is it wrong? (I have no idea what Emscripten is.)

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

Re: Exception starting samples on macOS

Post by dark_sylinc »

This is a bug. Fixed.

OGRE_CONFIG_UNIX_NO_X11 is a flag to prevent OgreNext linking against X11 at all when building for Linux (in case you want pure-headless builds that can run without even having X11/Xorg installed on the system).

However what I don't get is that OGRE_CONFIG_UNIX_NO_X11 defaults to false; it should not be set unless you explicitly (i.e. by accident) set it.

jwwalker
Goblin
Posts: 224
Joined: Thu Aug 12, 2021 10:06 pm
Location: San Diego, CA, USA
x 17
Contact:

Re: Exception starting samples on macOS

Post by jwwalker »

dark_sylinc wrote: Wed Feb 01, 2023 1:19 am

However what I don't get is that OGRE_CONFIG_UNIX_NO_X11 defaults to false; it should not be set unless you explicitly (i.e. by accident) set it.

My bad. I set the CMake parameter OGRE_CONFIG_UNIX_NO_X11 to YES because, well, that just seemed reasonable, since I didn't want X11.

Thanks for the clarification.

Post Reply