Cant build ogre due to cmake error

Problems building or running the engine, queries about how to use features etc.
Post Reply
ranar
Kobold
Posts: 25
Joined: Fri Oct 18, 2013 4:50 am

Cant build ogre due to cmake error

Post by ranar »

I have build ogre before and this time i have ran into several problems first the ogredeps-freeimage kept saying it could not find unistd.h i looked at it and found that it was for linux apparently so i just commented it out and it built fine. Now on the ogre build cmake says this

Code: Select all

CMake Error: Error in cmake code at
C:/Users/username/Documents/Visual Studio 2012/Lib/ogre/Samples/Browser/CMakeLists.txt:313:
Parse error.  Function missing ending ")".  Instead found bad character with text "[".
this wont allow me to generate the files need to build ogre. I tried disabling the samples and that does not work either.
ranar
Kobold
Posts: 25
Joined: Fri Oct 18, 2013 4:50 am

Re: Cant build ogre due to cmake error

Post by ranar »

So it does have to do something with the samples after all the build samples is the problem if i disable this it generates a sln file. I would like to try the samples on this pc too. oh well shouldn't hurt anything.
ImLucid
Halfling
Posts: 41
Joined: Tue Dec 24, 2013 1:38 am

Re: Cant build ogre due to cmake error

Post by ImLucid »

Well this build is not working. I have also redownloaded the ogre and ogre deps but still having same problem with cmake. Can u guys build 1.9 from source with no cmake errors? I cant I get the error in OP

EDIT: I figured it out...I have no idea if this is the proper way to do it since I have never looked at cmake code before but in the cmakelist file in this code

Code: Select all

foreach(FWK ${FRAMEWORKS})
	add_custom_command(TARGET SampleBrowser POST_BUILD
        COMMAND ARGS if [ -d ${OGRE_BINARY_DIR}/lib/${OGRE_OSX_BUILD_CONFIGURATION}/${FWK}.framework ]\; then ln -s -f ${OGRE_BINARY_DIR}/lib/${OGRE_OSX_BUILD_CONFIGURATION}/${FWK}.framework ${OGRE_SAMPLE_CONTENTS_PATH}/Frameworks/${FWK}.framework\; fi
		)
    endforeach(FWK)
I took out the brackets so now it looks like this

Code: Select all

    foreach(FWK ${FRAMEWORKS})
	add_custom_command(TARGET SampleBrowser POST_BUILD
        COMMAND ARGS if -d ${OGRE_BINARY_DIR}/lib/${OGRE_OSX_BUILD_CONFIGURATION}/${FWK}.framework\; then ln -s -f ${OGRE_BINARY_DIR}/lib/${OGRE_OSX_BUILD_CONFIGURATION}/${FWK}.framework ${OGRE_SAMPLE_CONTENTS_PATH}/Frameworks/${FWK}.framework\; fi
		)
    endforeach(FWK)
That seemed to fix it
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Cant build ogre due to cmake error

Post by c6burns »

I do not have this problem with v1-9 head using cmake 2.8.12.2. When having a cmake problem, including your version is a wise move. You might be trying to use 3.0 which is so new it probably doesn't have the kinks worked out yet in v1-9 head.

EDIT: ah yes, this seems absolutely related to this PR: https://bitbucket.org/sinbad/ogre/pull- ... e-419/diff
EDIT2: I tested that PR and it works in v1-9
ImLucid
Halfling
Posts: 41
Joined: Tue Dec 24, 2013 1:38 am

Re: Cant build ogre due to cmake error

Post by ImLucid »

Yes that looks like the fix, i am using cmake 3.0
ranar
Kobold
Posts: 25
Joined: Fri Oct 18, 2013 4:50 am

Re: Cant build ogre due to cmake error

Post by ranar »

Okay i got it to compile and i was following the wiki to set up the project to make sure it works and i got these errors.

Code: Select all

Error	1	error C2039: 'WindowEventListener' : is not a member of 'Ogre'	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.h	37	1	ogretest
Error	2	error C2504: 'WindowEventListener' : base class undefined	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.h	37	1	ogretest
Error	3	error C2039: 'WindowEventListener' : is not a member of 'Ogre'	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.h	37	1	ogretest
Error	4	error C2504: 'WindowEventListener' : base class undefined	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.h	37	1	ogretest
Error	5	error C2039: 'BLANK' : is not a member of 'Ogre::StringUtil'	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	25	1	ogretest
Error	6	error C2065: 'BLANK' : undeclared identifier	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	25	1	ogretest
Error	7	error C2039: 'BLANK' : is not a member of 'Ogre::StringUtil'	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	26	1	ogretest
Error	8	error C2065: 'BLANK' : undeclared identifier	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	26	1	ogretest
Error	9	error C3083: 'WindowEventUtilities': the symbol to the left of a '::' must be a type	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	48	1	ogretest
Error	10	error C2039: 'removeWindowEventListener' : is not a member of 'Ogre'	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	48	1	ogretest
Error	11	error C3861: 'removeWindowEventListener': identifier not found	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	48	1	ogretest
Error	12	error C3083: 'WindowEventUtilities': the symbol to the left of a '::' must be a type	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	123	1	ogretest
Error	13	error C2039: 'addWindowEventListener' : is not a member of 'Ogre'	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	123	1	ogretest
Error	14	error C3861: 'addWindowEventListener': identifier not found	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	123	1	ogretest
Error	15	error C2027: use of undefined type 'Ogre::TextureManager'	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	250	1	ogretest
Error	16	error C2228: left of '.setDefaultNumMipmaps' must have class/struct/union	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	250	1	ogretest
Error	17	error C3861: 'getSingleton': identifier not found	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	250	1	ogretest
Error	18	error C2027: use of undefined type 'Ogre::MaterialManager'	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	349	1	ogretest
Error	19	error C2228: left of '.setDefaultTextureFiltering' must have class/struct/union	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	349	1	ogretest
Error	20	error C3861: 'getSingleton': identifier not found	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	349	1	ogretest
Error	21	error C2027: use of undefined type 'Ogre::MaterialManager'	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	350	1	ogretest
Error	22	error C2228: left of '.setDefaultAnisotropy' must have class/struct/union	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	350	1	ogretest
Error	23	error C3861: 'getSingleton': identifier not found	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	350	1	ogretest
Error	24	error C2027: use of undefined type 'Ogre::TextureManager'	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	378	1	ogretest
Error	25	error C2228: left of '.reloadAll' must have class/struct/union	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	378	1	ogretest
Error	26	error C3861: 'getSingleton': identifier not found	c:\users\username\documents\visual studio 2012\projects\ogretest\ogretest\baseapplication.cpp	378	1	ogretest
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Cant build ogre due to cmake error

Post by c6burns »

You are using 1.10 and the wiki framework needs to be updated for it. You can do this manually. Add this to BaseApplication.h:

Code: Select all

#include <OgreMaterialManager.h>
#include <OgreTextureManager.h>
#include <OgreWindowEventUtilities.h>
And change Ogre::StringUtil::BLANK to Ogre::BLANKSTRING
ranar
Kobold
Posts: 25
Joined: Fri Oct 18, 2013 4:50 am

Re: Cant build ogre due to cmake error

Post by ranar »

Yeah that fixed it but i thought for sure i was using the 1.9 version
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: Cant build ogre due to cmake error

Post by spacegaier »

FYI, I just uploaded a new updated Ogre Wiki Tutorial Framework for Ogre 1.10 ("Xalafu").

Links can be found on the respective wiki page.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Post Reply