[Ogre-Next] bad $-escape (literal $ must be written as $$) when running cmake on EmptyProject Topic is solved

Problems building or running the engine, queries about how to use features etc.
Post Reply
Proton[Neutron]
Gnoblar
Posts: 1
Joined: Mon Mar 20, 2023 7:55 pm

[Ogre-Next] bad $-escape (literal $ must be written as $$) when running cmake on EmptyProject

Post by Proton[Neutron] »

Ogre Version: ogre-next newest idk
Operating System: :macOS Big Sur:
Render System: :Metal:

Hello, after hours I finally built Ogre Next successfully using the build script, I tried to create a new project. I followed the steps on the website. I copied the EmptyProject folder, and set the OGRE_BINARIES and OGRE_SOURCE variables or something to their paths, I finally got a different error, but I can't seem to find a way to fix this.

The error:

Code: Select all

[proc] Executing command: /usr/local/bin/cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/usr/local/bin/gcc-12 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/local/bin/g++-12 -S/Users/fildom/Developer/CMAKE/obezic -B/Users/fildom/Developer/CMAKE/obezic/build -G Ninja
[cmake] Not searching for unused variables given on the command line.
[cmake] -- FALSE
[cmake] -- Detected DLL build of Ogre
[cmake] -- Found SDL2
[cmake] -- Detected Atmosphere Component. Linking against it.
[cmake] -- Copying Hlms data files from Ogre repository
[cmake] -- Copying Common data files from Ogre repository
[cmake] -- Copying DLLs and generating Plugins.cfg for Debug
[cmake] -- Copying DLLs and generating Plugins.cfg for Release
[cmake] -- Copying DLLs and generating Plugins.cfg for RelWithDebInfo
[cmake] -- Copying DLLs and generating Plugins.cfg for MinSizeRel
[cmake] -- Generating /Users/fildom/Developer/CMAKE/obezic/bin/Data/resources2.cfg from template
[cmake] 		/Users/fildom/Developer/CMAKE/obezic/CMake/Templates/Resources.cfg.in
[cmake] -- Copying OgreSamplesCommon cpp and header files to
[cmake] 		/Users/fildom/Developer/CMAKE/obezic/include/OgreCommon
[cmake] 		/Users/fildom/Developer/CMAKE/obezic/src/OgreCommon/
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] CMake Error:
[cmake]   Running
[cmake] 
[cmake]    '/usr/local/bin/ninja' '-C' '/Users/fildom/Developer/CMAKE/obezic/build' '-t' 'recompact'
[cmake] 
[cmake]   failed with:
[cmake] 
[cmake]    ninja: error: build.ninja:240: bad $-escape (literal $ must be written as $$)
[cmake] 
[cmake]   
[cmake] [cmake] [cmake] [cmake] CMake Generate step failed. Build files cannot be regenerated correctly. [proc] The command: /usr/local/bin/cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/usr/local/bin/gcc-12 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/local/bin/g++-12 -S/Users/fildom/Developer/CMAKE/obezic -B/Users/fildom/Developer/CMAKE/obezic/build -G Ninja exited with code: 1
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: [Ogre-Next] bad $-escape (literal $ must be written as $$) when running cmake on EmptyProject

Post by dark_sylinc »

Hi!

Please use the XCode generator (i.e. -GXcode).

To build from command line you can use:

Code: Select all

cmake --build . --target ALL_BUILD --config Debug
Proton[Neutron]
Gnoblar
Posts: 1
Joined: Mon Mar 20, 2023 7:55 pm

Re: [Ogre-Next] bad $-escape (literal $ must be written as $$) when running cmake on EmptyProject

Post by Proton[Neutron] »

Thanks for there response, it worked!

Last edited by Proton[Neutron] on Wed Mar 22, 2023 7:19 am, edited 1 time in total.
Post Reply