2.1 build fails

Problems building or running the engine, queries about how to use features etc.
Post Reply
rrl
Halfling
Posts: 55
Joined: Sun Jun 04, 2017 12:33 am

2.1 build fails

Post by rrl » Sun Aug 12, 2018 7:46 pm

Ogre Version: 2.1
Operating System: linux
Render System: gl3+

I just did a pull from v2-1 to update my ogre, and when building, I'm seeing this.

Thoughts?

Code: Select all

[ 41%] Building CXX object OgreMain/CMakeFiles/OgreMain.dir/src/Math/Array/OgreArrayMemoryManager.cpp.o
[ 41%] Building CXX object OgreMain/CMakeFiles/OgreMain.dir/src/Math/Array/OgreBoneArrayMemoryManager.cpp.o
/home/pepp/tools/ogre-v2-1/OgreMain/src/Compositor/Pass/PassQuad/OgreCompositorPassQuad.cpp: In member function ‘virtual void Ogre::CompositorPassQuad::execute(const Ogre::Camera*)’:
/home/pepp/tools/ogre-v2-1/OgreMain/src/Compositor/Pass/PassQuad/OgreCompositorPassQuad.cpp:297:32: error: invalid use of incomplete type ‘class Ogre::v1::HardwarePixelBufferSharedPtr’
                 tex->getBuffer()->getRenderTarget()->setFsaaResolved();
                                ^
In file included from /home/pepp/tools/ogre-v2-1/OgreMain/include/Compositor/Pass/OgreCompositorPassDef.h:34:0,
                 from /home/pepp/tools/ogre-v2-1/OgreMain/include/Compositor/Pass/OgreCompositorPass.h:34,
                 from /home/pepp/tools/ogre-v2-1/OgreMain/include/Compositor/Pass/PassQuad/OgreCompositorPassQuad.h:34,
                 from /home/pepp/tools/ogre-v2-1/OgreMain/src/Compositor/Pass/PassQuad/OgreCompositorPassQuad.cpp:31:
/home/pepp/tools/ogre-v2-1/OgreMain/include/OgrePrerequisites.h:380:15: note: forward declaration of ‘class Ogre::v1::HardwarePixelBufferSharedPtr’
         class HardwarePixelBufferSharedPtr;
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 x

fm946969
Gnoblar
Posts: 1
Joined: Mon Aug 13, 2018 12:22 pm

Re: 2.1 build fails

Post by fm946969 » Mon Aug 13, 2018 1:36 pm

Hello, first of all, I am new to ogre.
I got the same error message with detailed info:
Ogre version: 2.1
Revision: 12912
Branch: v2-1
OS: Win 10 x64
Build Tool: VS 2017 Community

Code: Select all

1>------ Build started: Project: OgreMain, Configuration: Release x64 ------
1>OgreCompositorPassQuad.cpp
1>c:\ogre\ogremain\src\compositor\pass\passquad\ogrecompositorpassquad.cpp(304): error C2027: use of undefined type 'Ogre::v1::HardwarePixelBufferSharedPtr'
1>c:\ogre\ogremain\include\ogreprerequisites.h(380): note: see declaration of 'Ogre::v1::HardwarePixelBufferSharedPtr'
1>c:\ogre\ogremain\src\compositor\pass\passquad\ogrecompositorpassquad.cpp(304): error C2227: left of '->getRenderTarget' must point to class/struct/union/generic type
1>c:\ogre\ogremain\src\compositor\pass\passquad\ogrecompositorpassquad.cpp(304): error C2227: left of '->setFsaaResolved' must point to class/struct/union/generic type
1>Done building project "OgreMain.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

After some research, I found the problem might be related to "forward class declaration and some member functions are called prior to its definition".
The affected classes are:

Code: Select all

Ogre::v1::HardwarePixelBufferSharedPtr
Ogre::TexturePtr
Ogre::RenderTarget.
I tried adding the required headers in "OgreCompositionPassQuad.cpp". I am not sure if it is the best solution but at least it works for me. I hope this helps.

Code: Select all

// OgreMain\src\Compositor\Pass\PassQuad\OgreCompositorPassQuad.cpp
#include "OgreMain\include\OgreTexture.h"
#include "OgreMain\include\OgreRenderTexture.h"
#include "OgreMain\include\OgreHardwarePixelBuffer.h"
#ref : https://stackoverflow.com/questions/339 ... lare-class
0 x

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

Re: 2.1 build fails

Post by dark_sylinc » Mon Aug 13, 2018 3:06 pm

This bug was introduced 2 days ago. Fixed.

Sorry for the inconvenience.

Thanks for the report!
0 x

Post Reply