Building Blender Help Thread

All the tutorials on how to build Blender are broken. :frowning:

Does anyone have any backups or other tutorials?

EDIT: Recycling this thread if that’s ok…

What do you mean?! Did you check http://wiki.blender.org ?

Oh, sorry.

I mean building Blender from source.:o

Well yes, that too…
http://wiki.blender.org/index.php/Dev:Doc/Building_Blender

http://www.geneome.net/blender-tutorials/building-blender-with-msvc-using-cmake/

Still works great…

Thanks, I’ll try those.

I could never genome’s to work for me, but that’s probably just because I don’t know enough.

OK, so I’ve been using the gnome tutorial but I can never seem to get it working.

I suspect that not I don’t have all the necessary dependencies and that some paths may be missing.

But I’m confused as to exactly what I need; this page lists libjeg, libpng, zlib, OpenAL, SDL, and ODE (I only use avi codec when I render so I turn quicktime off in cmake).

But Gnome only lists Quicktime, OpenEXR, and OpenMP.:confused:

Also, does VS2008 C++ Express come with the Windows Platform SDK or do I still need to download that separately?

You should download the lib/windows directory from Blender svn, it contains all the external libraries you’ll need to build Blender. Much easier to use if you’re not really into compiling and stuff :slight_smile:

And yes, you’ll have to download the PSDK from the MSDN. Afaik there’s a link to it on the MSVC download page as well.

Just did that.

Now do I make paths in visual studio to each one of those folders for executable [bin], library and includes?

And yes, you’ll have to download the PSDK from the MSDN. Afaik there’s a link to it on the MSVC download page as well.

The thing is, I already have it installed on my machine, supposedly.:confused:

I think it came with VS 2008 Express as one of the things it installed, and I already have a path setup for it in visual studio.

No no, just make sure the directory is like in the screenshow below and all will be fine. “blender” is the blender directory from svn. CMake adds the required paths for MSVC to find the libraries. You don’t have to configure any header or library paths at all.

http://i27.tinypic.com/29emavd.jpg

You can use the CMake gui tool to make MSVC build in the “build” directory you’re seeing here. This is very convenient because you can easily remove the whole build that way (if anything goes wrong, or if you would like to make multiple builds, or whatever else).

http://i29.tinypic.com/256r334.jpg

The thing is, I already have it installed on my machine, supposedly.:confused:

I think it came with VS 2008 Express as one of the things it installed, and I already have a path setup for it in visual studio.

Nice, then you won’t have to do that again :wink: huge time saver!

What do you have in the lib folder?

The dependencies? :confused:

Or do I just need the 2.5 (or 2.49) folder and a build folder?

That’s where all the libraries are :slight_smile: libjeg, libpng, zlib, OpenAL, SDL, ODE and so on.

You need the 2.5 branch for Blender 2.5, the libraries are in the trunk at https://svn.blender.org/svnroot/bf-blender/trunk/lib (that should be in your lib directory) and the build folder is automatically created by CMake (and the contents are generated by MSVC).

Oh, well, I’m actually just trying to build standard blender (2.49).

Would I use the same lib checkout for that?

Also, I’ve never had cmake build the destination automatically, I always have to create a folder.

Does that mean I’m doing something wrong?

EDIT: Also, in your directory tree there, what’s in the blender folder? Is that where the actual source is?

My tree went like: blender svn> blender 25 > source

Is yours blender25> blender (source in here) ?

Create yourself a folder like ‘blender_source’ (name doesn’t matter) then checkout both ‘lib’ and ‘blender’ into this folder the same way you checked out the regular blender source from svn.

Then, later on, the build and install directories will get created here and all sorts of magic will happen.

I see. I’ll try that, thanks.

EDIT: Do I make two separate folders ‘lib’ and ‘blender’ or put them in one?

Because right now I’m trying to figure out how to make two checkouts in one. :confused:

Oops. Yeah, it’s the same for 2.49.

Would I use the same lib checkout for that?

Yes.

EDIT: Also, in your directory tree there, what’s in the blender folder? Is that where the actual source is?

My tree went like: blender svn> blender 25 > source

Is yours blender25> blender (source in here) ?

Yes.

Mine is like: blender svn > blender25 > blender > source

I suspect that the problems are related to the paths not being setup correctly.

Do I have to MANUALLY set the paths for lib and include for EVERY library?!!?

I thought someone said CMake is supposed to set that for you?

Would it if the libs were in the main source folder?

Could you post the layout of your dir structure? (including the libs)

blender_svn>blender

and blender_svn>windows (lib folder)

Is that it?:confused:

Maybe I just shouldn’t bother till I know more about coding?

Make that blender_svn > lib > windows for the lib directory instead and you’ll be all fine :slight_smile:

So if you’d look in the blender_svn/lib/windows directory, you’d see more directories for aqsis, freetype, CRTL, ffmpeg, etc.