Cant compile Blender DARGO error: expected class-name before ‘,’ token

Problems building or running the engine, queries about how to use features etc.
Vido
Halfling
Posts: 53
Joined: Thu Feb 26, 2015 3:48 pm

Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by Vido » Wed Dec 05, 2018 9:22 pm

Ogre Version: :2.1:
Operating System: :Linux Ubutu 16.04:
Render System: :OpenGL:
Im trying to compile Blender DARGO but I'v got following error

Code: Select all

 make
[  7%] Building CXX object CMakeFiles/DERGO_Server.dir/src/main.cpp.o
In file included from /home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/./include/DergoSystem.h:9:0,
                 from /home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/src/main.cpp:18:
/home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/Dependencies/Ogre/Components/SceneFormat/include/OgreSceneFormatBase.h:125:36: error: expected class-name before ‘,’ token
             public HlmsJsonListener, public HlmsTextureExportListener
                                    ^
/home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/Dependencies/Ogre/Components/SceneFormat/include/OgreSceneFormatBase.h:125:45: error: invalid use of incomplete type ‘class Ogre::HlmsTextureExportListener’
             public HlmsJsonListener, public HlmsTextureExportListener
                                             ^
In file included from /home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/./include/Network/NetworkMessage.h:4:0,
                 from /home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/src/main.cpp:14:
/home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/Dependencies/Ogre/OgreMain/include/OgrePrerequisites.h:215:11: note: forward declaration of ‘class Ogre::HlmsTextureExportListener’
     class HlmsTextureExportListener;
           ^
CMakeFiles/DERGO_Server.dir/build.make:278: recipe for target 'CMakeFiles/DERGO_Server.dir/src/main.cpp.o' failed
make[2]: *** [CMakeFiles/DERGO_Server.dir/src/main.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/DERGO_Server.dir/all' failed
make[1]: *** [CMakeFiles/DERGO_Server.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
0 x

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

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by dark_sylinc » Thu Dec 06, 2018 12:07 am

Ogre 2.1 must be build with JSON support.

See Setting up Ogre on how to build Ogre and how to setup the Dependencies.

If done correctly, this file should exist OgreRepo/Dependencies/include/rapidjson/rapidjson.h
And make sure OGRE_CONFIG_ENABLE_JSON in CMake is ticked (this option won't appear if rapidjson is not detected)
0 x

Vido
Halfling
Posts: 53
Joined: Thu Feb 26, 2015 3:48 pm

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by Vido » Thu Dec 06, 2018 1:59 pm

dark_sylinc wrote:
Thu Dec 06, 2018 12:07 am
Ogre 2.1 must be build with JSON support.

See Setting up Ogre on how to build Ogre and how to setup the Dependencies.

If done correctly, this file should exist OgreRepo/Dependencies/include/rapidjson/rapidjson.h
And make sure OGRE_CONFIG_ENABLE_JSON in CMake is ticked (this option won't appear if rapidjson is not detected)
Yup I'v build Ogre with JSON ticked but got similar error

Code: Select all

[ 76%] Building CXX object CMakeFiles/DERGO_Server.dir/src/main.cpp.o
In file included from /home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/./include/DergoSystem.h:9:0,
                 from /home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/src/main.cpp:18:
/home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/Dependencies/Ogre/Components/SceneFormat/include/OgreSceneFormatBase.h:125:36: error: expected class-name before ‘,’ token
             public HlmsJsonListener, public HlmsTextureExportListener
                                    ^
/home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/Dependencies/Ogre/Components/SceneFormat/include/OgreSceneFormatBase.h:125:45: error: invalid use of incomplete type ‘class Ogre::HlmsTextureExportListener’
             public HlmsJsonListener, public HlmsTextureExportListener
                                             ^
In file included from /home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/./include/Network/NetworkMessage.h:4:0,
                 from /home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/src/main.cpp:14:
/home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/Dependencies/Ogre/OgreMain/include/OgrePrerequisites.h:215:11: note: forward declaration of ‘class Ogre::HlmsTextureExportListener’
     class HlmsTextureExportListener;
           ^
CMakeFiles/DERGO_Server.dir/build.make:278: recipe for target 'CMakeFiles/DERGO_Server.dir/src/main.cpp.o' failed
make[2]: *** [CMakeFiles/DERGO_Server.dir/src/main.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/DERGO_Server.dir/all' failed
make[1]: *** [CMakeFiles/DERGO_Server.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Also I got this error when run cmake-gui . on DERGO_Server

Code: Select all

CMake Error at CMake/Dependencies/OGRE.cmake:26 (file):
  file COPY cannot find
  "/home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/Dependencies/Ogre/build/RelWithDebInfo/lib/libOgreSceneFormat.so".
Call Stack (most recent call first):
  CMake/Dependencies/OGRE.cmake:133 (copyWithSymLink)
  CMake/Dependencies/OGRE.cmake:289 (setupPluginFileFromTemplate)
  CMakeLists.txt:22 (setupOgre)


CMake Error at CMake/Dependencies/OGRE.cmake:28 (file):
  file COPY cannot find
  "/home/slobodan/dark_sylinc-dergo-blender-3ff610d2eff4/DERGO_Server/Dependencies/Ogre/build/RelWithDebInfo/lib//libOgreSceneFormat.so".
Call Stack (most recent call first):
  CMake/Dependencies/OGRE.cmake:133 (copyWithSymLink)
  CMake/Dependencies/OGRE.cmake:289 (setupPluginFileFromTemplate)
  CMakeLists.txt:22 (setupOgre)
0 x

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

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by dark_sylinc » Thu Dec 06, 2018 3:21 pm

Ah right! I forgot: DERGO needs OGRE_COMPONENT_SCENE_FORMAT (I'm not sure if it's exactly named like that, I'm not at computer right now) which is not enabled by default.
0 x

Vido
Halfling
Posts: 53
Joined: Thu Feb 26, 2015 3:48 pm

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by Vido » Thu Dec 06, 2018 5:05 pm

dark_sylinc wrote:
Thu Dec 06, 2018 3:21 pm
Ah right! I forgot: DERGO needs OGRE_COMPONENT_SCENE_FORMAT (I'm not sure if it's exactly named like that, I'm not at computer right now) which is not enabled by default.
I dont have "OGRE_COMPONENT_SCENE_FORMAT" maybe its OGRE_BUILD_COMPONENT_TERRAIN ?

Edit: Nope its not I cant even compile OGRE with that enabled
0 x

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

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by dark_sylinc » Thu Dec 06, 2018 6:48 pm

Bloody forum didn't submit my post.

I am at computer now. The name is OGRE_BUILD_COMPONENT_SCENE_FORMAT.

If you don't have it, then Rapidjson was not detected correctly or OGRE_CONFIG_ENABLE_JSON was unchecked. See my previous post on setting Ogre up.
0 x

Vido
Halfling
Posts: 53
Joined: Thu Feb 26, 2015 3:48 pm

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by Vido » Thu Dec 06, 2018 7:45 pm

dark_sylinc wrote:
Thu Dec 06, 2018 6:48 pm
Bloody forum didn't submit my post.

I am at computer now. The name is OGRE_BUILD_COMPONENT_SCENE_FORMAT.

If you don't have it, then Rapidjson was not detected correctly or OGRE_CONFIG_ENABLE_JSON was unchecked. See my previous post on setting Ogre up.
Yes I folowed your post on how to setup OGRE and its Dependencies And there is no OGRE_BUILD_COMPONENT_SCENE_FORMAT
On instruction page it say put dependencies i side OGRE bur structure is not include/rapidjson/rapidjson.h its

Code: Select all

cd DERGO_Server/Dependencies/Ogre/Dependencies 
ls
cmake  CMakeLists.txt  readme.txt  src  versions.txt
I tried to manualy copy from

Code: Select all

src/rapidjson/include/* to ../../../
but did not helped I have RapidJSON everywere but dont have

Code: Select all

OGRE_BUILD_COMPONENT_SCENE_FORMAT 
I followed instructions step by step and I cant have OGRE_BUILD_COMPONENT_SCENE_FORMAT to show up
0 x

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

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by dark_sylinc » Thu Dec 06, 2018 7:53 pm

Mmmm...

Move the folder DERGO_Server/Dependencies/Ogre/Dependencies somewhere else i.e. /home/username/ogredeps
Go to /home/username/ogredeps/build/ogredeps and copy it to DERGO_Server/Dependencies/Ogre/Dependencies
0 x

Vido
Halfling
Posts: 53
Joined: Thu Feb 26, 2015 3:48 pm

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by Vido » Thu Dec 06, 2018 8:02 pm

dark_sylinc wrote:
Thu Dec 06, 2018 7:53 pm
Mmmm...

Move the folder DERGO_Server/Dependencies/Ogre/Dependencies somewhere else i.e. /home/username/ogredeps
Go to /home/username/ogredeps/build/ogredeps and copy it to DERGO_Server/Dependencies/Ogre/Dependencies
Nope OGRE_BUILD_COMPONENT_SCENE_FORMAT wont to show up
0 x

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

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by dark_sylinc » Thu Dec 06, 2018 8:11 pm

You need to press "Configure" again (if using CMake GUI) for the changes to show up again.
In some cases CMake marks something as not found permanently and deleting the build folder and starting over is easier. Before running CMake, the file Dependencies/include/rapidjson/rapidjson.h should exist (if not, then just copy paste the rapidjson folder....)
0 x

Vido
Halfling
Posts: 53
Joined: Thu Feb 26, 2015 3:48 pm

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by Vido » Thu Dec 06, 2018 8:14 pm

So I tried to find OGRE_BUILD_COMPONENT_SCENE_FORMAT in Dependencies

Code: Select all

hg clone https://bitbucket.org/cabalistic/ogredeps Dependencies
like so

Code: Select all

grep -rnw '/home/slobodan/Dependencies/' -e 'OGRE_BUILD_COMPONENT_SCENE_FORMAT'
and it bring nothing as resoult so rapidjson does not enable OGRE_BUILD_COMPONENT_SCENE_FORMAT
0 x

Vido
Halfling
Posts: 53
Joined: Thu Feb 26, 2015 3:48 pm

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by Vido » Thu Dec 06, 2018 8:17 pm

dark_sylinc wrote:
Thu Dec 06, 2018 8:11 pm
You need to press "Configure" again (if using CMake GUI) for the changes to show up again.
In some cases CMake marks something as not found permanently and deleting the build folder and starting over is easier. Before running CMake, the file Dependencies/include/rapidjson/rapidjson.h should exist (if not, then just copy paste the rapidjson folder....)
I delete Cmake cashes and stuff and hitting configure each time I change something
can you try to follow https://ogrecave.github.io/ogre/api/2.1 ... linux.html and see does it show up ?
0 x

Vido
Halfling
Posts: 53
Joined: Thu Feb 26, 2015 3:48 pm

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by Vido » Thu Dec 06, 2018 8:24 pm

dark_sylinc wrote:
Thu Dec 06, 2018 8:11 pm
You need to press "Configure" again (if using CMake GUI) for the changes to show up again.
In some cases CMake marks something as not found permanently and deleting the build folder and starting over is easier. Before running CMake, the file Dependencies/include/rapidjson/rapidjson.h should exist (if not, then just copy paste the rapidjson folder....)
Ogre 2.1 does not contain OGRE_BUILD_COMPONENT_SCENE_FORMAT preriod, which version of OGRE do you use dark_sylinc ?
0 x

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

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by dark_sylinc » Thu Dec 06, 2018 8:41 pm

First run these command:

Code: Select all

sudo apt-get install libfreetype6-dev libfreeimage-dev libzzip-dev libxrandr-dev libxaw7-dev freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev doxygen graphviz python-clang-4.0
Now save this as a bash script and run these commands:

Code: Select all

#!/bin/bash
mkdir Test
cd Test
mkdir ogredeps
echo "--- Cloning Ogredeps ---"
hg clone https://bitbucket.org/cabalistic/ogredeps ogredeps
cd ogredeps
mkdir build
cd build
cmake -G Ninja ..
echo "--- Building Ogredeps ---"
ninja
ninja install
cd ../../
mkdir ogre
echo "--- Cloning Ogre 2.1 ---"
hg clone https://bitbucket.org/sinbad/ogre -r v2-1 ogre
cd ogre
ln -s ../ogredeps/build/ogredeps Dependencies
mkdir -p build/Debug
mkdir -p build/Release
cd build/Debug
echo "--- Building Ogre (Debug) ---"
cmake -D OGRE_USE_BOOST=0 -D OGRE_CONFIG_THREAD_PROVIDER=0 -D OGRE_CONFIG_THREADS=0 -D OGRE_BUILD_COMPONENT_SCENE_FORMAT=1 -D OGRE_BUILD_SAMPLES2=1 -D OGRE_BUILD_TESTS=0 -D CMAKE_BUILD_TYPE="Debug" -G Ninja ../..
ninja
cd ../Release
echo "--- Building Ogre (Release) ---"
cmake -D OGRE_USE_BOOST=0 -D OGRE_CONFIG_THREAD_PROVIDER=0 -D OGRE_CONFIG_THREADS=0 -D OGRE_BUILD_COMPONENT_SCENE_FORMAT=1 -D OGRE_BUILD_SAMPLES2=1 -D OGRE_BUILD_TESTS=0 -D CMAKE_BUILD_TYPE="Release" -G Ninja ../..
ninja

echo "Done!"
After it's done, go to where you have placed Dergo (i.e. I have it at /home/matias/Projects/DERGO_Blender) and run:

Code: Select all

cd DERGO_Server
mkdir Dependencies
cd Dependencies
ln -s path/to/Test/ogre Ogre
0 x

Vido
Halfling
Posts: 53
Joined: Thu Feb 26, 2015 3:48 pm

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by Vido » Thu Dec 06, 2018 9:28 pm

dark_sylinc wrote:
Thu Dec 06, 2018 8:41 pm
First run these command:

Code: Select all

sudo apt-get install libfreetype6-dev libfreeimage-dev libzzip-dev libxrandr-dev libxaw7-dev freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev doxygen graphviz python-clang-4.0
Now save this as a bash script and run these commands:

Code: Select all

#!/bin/bash
mkdir Test
cd Test
mkdir ogredeps
echo "--- Cloning Ogredeps ---"
hg clone https://bitbucket.org/cabalistic/ogredeps ogredeps
cd ogredeps
mkdir build
cd build
cmake -G Ninja ..
echo "--- Building Ogredeps ---"
ninja
ninja install
cd ../../
mkdir ogre
echo "--- Cloning Ogre 2.1 ---"
hg clone https://bitbucket.org/sinbad/ogre -r v2-1 ogre
cd ogre
ln -s ../ogredeps/build/ogredeps Dependencies
mkdir -p build/Debug
mkdir -p build/Release
cd build/Debug
echo "--- Building Ogre (Debug) ---"
cmake -D OGRE_USE_BOOST=0 -D OGRE_CONFIG_THREAD_PROVIDER=0 -D OGRE_CONFIG_THREADS=0 -D OGRE_BUILD_COMPONENT_SCENE_FORMAT=1 -D OGRE_BUILD_SAMPLES2=1 -D OGRE_BUILD_TESTS=0 -D CMAKE_BUILD_TYPE="Debug" -G Ninja ../..
ninja
cd ../Release
echo "--- Building Ogre (Release) ---"
cmake -D OGRE_USE_BOOST=0 -D OGRE_CONFIG_THREAD_PROVIDER=0 -D OGRE_CONFIG_THREADS=0 -D OGRE_BUILD_COMPONENT_SCENE_FORMAT=1 -D OGRE_BUILD_SAMPLES2=1 -D OGRE_BUILD_TESTS=0 -D CMAKE_BUILD_TYPE="Release" -G Ninja ../..
ninja

echo "Done!"
After it's done, go to where you have placed Dergo (i.e. I have it at /home/matias/Projects/DERGO_Blender) and run:

Code: Select all

cd DERGO_Server
mkdir Dependencies
cd Dependencies
ln -s path/to/Test/ogre Ogre
Can you update script Im getting an error

Code: Select all

log: warning: no configuration file specified, using default values
log: ninja version 0.1.3 initializing
die: error: must run as root
Im not sure where needed to put them like does needed at -G Ninja ../..
0 x

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

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by dark_sylinc » Thu Dec 06, 2018 9:45 pm

Run:

Code: Select all

sudo apt remove ninja
sudo apt install ninja-build
There are two packages named identically in CLI. The ninja you have installed is a "Privilege escalation detection system for GNU/Linux" component that has nothing to do.
0 x

Vido
Halfling
Posts: 53
Joined: Thu Feb 26, 2015 3:48 pm

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by Vido » Thu Dec 06, 2018 10:11 pm

dark_sylinc wrote:
Thu Dec 06, 2018 9:45 pm
Run:

Code: Select all

sudo apt remove ninja
sudo apt install ninja-build
There are two packages named identically in CLI. The ninja you have installed is a "Privilege escalation detection system for GNU/Linux" component that has nothing to do.
I have instled blender 2.76b and it wont to recognize addon Im downloading 2.76, I placed all scripts in zip and installed from file ?
0 x

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

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by dark_sylinc » Thu Dec 06, 2018 10:16 pm

It needs a very up to date Blender. I'm using 2.79b
0 x

Vido
Halfling
Posts: 53
Joined: Thu Feb 26, 2015 3:48 pm

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by Vido » Thu Dec 06, 2018 10:21 pm

dark_sylinc wrote:
Thu Dec 06, 2018 10:16 pm
It needs a very up to date Blender. I'm using 2.79b
I'v got an error while compiling

Code: Select all

[409/651] Building CXX object Componen....dir/src/OgreSceneFormatImporter.cpp.o
ninja: build stopped: subcommand failed.
Done
!
0 x

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

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by dark_sylinc » Thu Dec 06, 2018 10:21 pm

Go to Test/ogre/build/Debug
Type "ninja" and paste the error it's spewing.
0 x

Vido
Halfling
Posts: 53
Joined: Thu Feb 26, 2015 3:48 pm

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by Vido » Thu Dec 06, 2018 10:23 pm

dark_sylinc wrote:
Thu Dec 06, 2018 10:21 pm
Go to Test/ogre/build/Debug
Type "ninja" and paste the error it's spewing.

Code: Select all

~/DERGO/Test/ogre/build/Debug$ ninja
[4/243] Building CXX object Components....dir/src/OgreSceneFormatExporter.cpp.o
FAILED: /usr/bin/c++   -DOgreSceneFormat_EXPORTS -I../../OgreMain/include -Iinclude -I../../Dependencies/include -I../../Dependencies/include/OIS -I/usr/include/Cg -I../../ -I../../OgreMain/include/Threading -I../../Components/SceneFormat/include -I../../Components/Hlms/Common/include -I../../Components/Hlms/Pbs/include -Wall -Winit-self -Wno-overloaded-virtual -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wshadow -Wno-missing-field-initializers -Wno-long-long -Wno-unused-but-set-parameter  -msse -msse2 -g -DDEBUG=1 -fPIC   -fPIC -DOGRE_GCC_VISIBILITY -fvisibility=hidden -fvisibility-inlines-hidden -MMD -MT Components/SceneFormat/CMakeFiles/OgreSceneFormat.dir/src/OgreSceneFormatExporter.cpp.o -MF Components/SceneFormat/CMakeFiles/OgreSceneFormat.dir/src/OgreSceneFormatExporter.cpp.o.d -o Components/SceneFormat/CMakeFiles/OgreSceneFormat.dir/src/OgreSceneFormatExporter.cpp.o -c ../../Components/SceneFormat/src/OgreSceneFormatExporter.cpp
../../Components/SceneFormat/src/OgreSceneFormatExporter.cpp: In member function ‘const char* Ogre::SceneFormatExporter::encodeFloat(float)’:
../../Components/SceneFormat/src/OgreSceneFormatExporter.cpp:144:33: error: ‘isfinite’ was not declared in this scope
             if( isfinite( value ) )
                                 ^
../../Components/SceneFormat/src/OgreSceneFormatExporter.cpp:144:33: note: suggested alternative:
In file included from ../../OgreMain/include/OgreStdHeaders.h:28:0,
                 from ../../OgreMain/include/OgrePrerequisites.h:428,
                 from ../../Components/SceneFormat/include/OgreSceneFormatPrerequisites.h:31,
                 from ../../Components/SceneFormat/include/OgreSceneFormatBase.h:31,
                 from ../../Components/SceneFormat/include/OgreSceneFormatExporter.h:31,
                 from ../../Components/SceneFormat/src/OgreSceneFormatExporter.cpp:31:
/usr/include/c++/5/cmath:844:5: note:   ‘std::isfinite’
     isfinite(_Tp __f)
     ^
../../Components/SceneFormat/src/OgreSceneFormatExporter.cpp: In member function ‘const char* Ogre::SceneFormatExporter::encodeDouble(double)’:
../../Components/SceneFormat/src/OgreSceneFormatExporter.cpp:168:33: error: ‘isfinite’ was not declared in this scope
             if( isfinite( value ) )
                                 ^
../../Components/SceneFormat/src/OgreSceneFormatExporter.cpp:168:33: note: suggested alternative:
In file included from ../../OgreMain/include/OgreStdHeaders.h:28:0,
                 from ../../OgreMain/include/OgrePrerequisites.h:428,
                 from ../../Components/SceneFormat/include/OgreSceneFormatPrerequisites.h:31,
                 from ../../Components/SceneFormat/include/OgreSceneFormatBase.h:31,
                 from ../../Components/SceneFormat/include/OgreSceneFormatExporter.h:31,
                 from ../../Components/SceneFormat/src/OgreSceneFormatExporter.cpp:31:
/usr/include/c++/5/cmath:844:5: note:   ‘std::isfinite’
     isfinite(_Tp __f)
     ^
[4/243] Building CXX object Components...dir/src/OgreLodWorkQueueInjector.cpp.o
ninja: build stopped: subcommand failed.
0 x

Vido
Halfling
Posts: 53
Joined: Thu Feb 26, 2015 3:48 pm

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by Vido » Thu Dec 06, 2018 10:28 pm

dark_sylinc wrote:
Thu Dec 06, 2018 10:16 pm
It needs a very up to date Blender. I'm using 2.79b
Nope same story it does not show up addon I have blender 2.79b
0 x

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

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by dark_sylinc » Thu Dec 06, 2018 10:34 pm

OFFS. This is a GCC bug.

Try better luck with GCC-5:

Code: Select all

sudo apt install gcc-5 g++-5
sudo update-alternatives --config cc
sudo update-alternatives --config c++
update-alternatives will ask you which compiler to use, select the newest one.
Perform "ninja clean" so that it can rebuild again (both on ogredeps/build and ogre/build/Debug) otherwise you'll be mixing object files generated by different compilers (that can cause bugs), or just delete everything / delete the build folders and start over.
0 x

Vido
Halfling
Posts: 53
Joined: Thu Feb 26, 2015 3:48 pm

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by Vido » Thu Dec 06, 2018 10:39 pm

dark_sylinc wrote:
Thu Dec 06, 2018 10:34 pm
OFFS. This is a GCC bug.

Try better luck with GCC-5:

Code: Select all

sudo apt install gcc-5 g++-5
sudo update-alternatives --config cc
sudo update-alternatives --config c++
update-alternatives will ask you which compiler to use, select the newest one.
Perform "ninja clean" so that it can rebuild again (both on ogredeps/build and ogre/build/Debug) otherwise you'll be mixing object files generated by different compilers (that can cause bugs), or just delete everything / delete the build folders and start over.

Code: Select all

$ sudo apt-get install gcc-5 g++-5
[sudo] password for slobodan: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
g++-5 is already the newest version (5.4.0-6ubuntu1~16.04.10).
gcc-5 is already the newest version (5.4.0-6ubuntu1~16.04.10).
The following package was automatically installed and is no longer required:
  libpng16-16
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
And update

Code: Select all

$ sudo update-alternatives --config  cc
There is only one alternative in link group cc (providing /usr/bin/cc): /usr/bin/gcc
Nothing to configure.
slobodan@G31M-ES2L:~/DERGO/Test/ogre/build/Debug$ sudo update-alternatives --config  cc++
update-alternatives: error: no alternatives for cc++
0 x

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

Re: Cant compile Blender DARGO error: expected class-name before ‘,’ token

Post by dark_sylinc » Thu Dec 06, 2018 10:49 pm

Barga@@#!aosjfn

Workaround it by editing the file and append "std::" so that it reads "std::isfinite". If a similar error arises again (e.g. with isinf) do the same.
0 x

Post Reply