[2.1] Sample Build Error Topic is solved

Problems building or running the engine, queries about how to use features etc.
Post Reply
DrSeuss
Gnoblar
Posts: 2
Joined: Wed Aug 14, 2019 5:09 pm

[2.1] Sample Build Error

Post by DrSeuss » Wed Aug 14, 2019 7:34 pm

Ogre Version: 2-1-0 unstable
Operating System: Ubuntu 18.04

Hello,

I'm completely new to OGRE. I've cloned the bitbucket repo and build it on my linux machine, and the next step was to guild some of the samples to learn the API. This is also the first time I'm using Cmake, so please bear with me as I'm not quite sure where my issue is coming from.

My process: followed https://ogrecave.github.io/ogre/api/2.1 ... linux.html on installing OGRE (clone OGRE & dependencies, build dependencies, build debug, build release)

open terminal in Ogre/samples/tutorial01

Code: Select all

mkdir build
cd build
cmake ../
at this point cmake throws the following exception:

Code: Select all

CMake Error at CMakeLists.txt:25 (ogre_add_executable):
  Unknown CMake command "ogre_add_executable".
and does not make a MakeFile, so the sample code can't be build. the ogre_add_executable command is the one that should be adding the source code to the makefile if I understand correctly, so it's not like I can just go comment it out of the cmakelists.txt file. Is there something that I haven't built properly that would be causing cmake to not recognize this command? The output log is intimidating and unreadable since I don't know what to look for. Any help would be very appreciated.
0 x

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

Re: [2.1] Sample Build Error

Post by dark_sylinc » Wed Aug 14, 2019 8:43 pm

Hi!

See this answer.

There's something I couldn't understand well: were you able to build the samples (any of them)?
Have you tried our build scripts?

Cheers
Matias
0 x

DrSeuss
Gnoblar
Posts: 2
Joined: Wed Aug 14, 2019 5:09 pm

Re: [2.1] Sample Build Error

Post by DrSeuss » Wed Aug 14, 2019 11:40 pm

Hey Matias,

Thanks for the direction to that other thread- I had been trying to build the tutorials as standalone projects when sure enough they had been built as part of ogre. I will try taking the tutorials that I've fiddled around with and compiling them in the "empty project"- which as I understand is the only one of the tutorials configured to be built as a standalone- and I believe that should give me the result I was originally hoping for, which was to make small changes to the tutorials as I begin learning ogre.

As for the build scripts, I found them after I had already cloned/built at the command line, and so I did not use them. What is the difference between the method on this page and using the build scripts?
0 x

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

Re: [2.1] Sample Build Error

Post by dark_sylinc » Thu Aug 15, 2019 12:40 am

Hi!

The online docs pages haven't been updated to mention the scripts.

The scripts just make your life easier and reduce margin of errors. But if you basically follow the steps of the guide you should be more or less doing what the scripts perform.

Often we get questions that something is broken, and that's because the steps weren't followed to the letter or a step was misunderstood. Our build process is unfortunately a little complicated so I can't really blame users. Thus the scripts supposedly just make the process user friendly.

And yes, for the regular tutorials; they have to be build together with Ogre; and you can setup your own project by using EmptyProject as a bootstrap.

Similar projects that were based on EmptyProject are Dergo (watchout v2-2 vs v2-1 branches), livingroom (uses v2-1) and Colibri (uses v2-2)
0 x

Post Reply