Failing to compile Blender

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
mconradie
Posts: 0
Joined: Mon Oct 14, 2013 7:48 pm
Location: South Africa

Failing to compile Blender

Post by mconradie » Mon Oct 14, 2013 7:58 pm

I've been teaching Blender to kids for a number of years and would like to start coding - even if it's just making simple tooltip changes to start with. I haven't coded in C++ for over ten years so it's going to be slow going at first.

I am running Windows 8, Visual Studio 2010 Express and have the latest stable version of Python (3.3.2) installed and I keep getting the following error when trying to compile Blender.

Code: Select all

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
2>------ Build started: Project: buildinfo, Configuration: Debug Win32 ------
3>------ Build started: Project: bf_python, Configuration: Debug Win32 ------
2>  Generating C:/BlenderSVN/blender/source/creator/buildinfo.h
2>  -- Found Subversion: C:/Program Files/TortoiseSVN/bin/svn.exe (found version "1.7.7") 
3>  bpy_traceback.c
3>c:\blendersvn\blender\source\blender\python\intern\bpy_traceback.c(49): error C4013: '_Py_IDENTIFIER' undefined; assuming extern returning int
3>c:\blendersvn\blender\source\blender\python\intern\bpy_traceback.c(49): error C2065: 'msg' : undeclared identifier
3>c:\blendersvn\blender\source\blender\python\intern\bpy_traceback.c(58): error C4013: '_PyObject_GetAttrId' undefined; assuming extern returning int
3>c:\blendersvn\blender\source\blender\python\intern\bpy_traceback.c(58): error C2065: 'PyId_msg' : undeclared identifier
3>c:\blendersvn\blender\source\blender\python\intern\bpy_traceback.c(58): warning C4047: '=' : 'PyObject *' differs in levels of indirection from 'int'
3>c:\blendersvn\blender\source\blender\python\intern\bpy_traceback.c(62): error C2065: 'PyId_filename' : undeclared identifier
3>c:\blendersvn\blender\source\blender\python\intern\bpy_traceback.c(62): warning C4047: '=' : 'PyObject *' differs in levels of indirection from 'int'
3>c:\blendersvn\blender\source\blender\python\intern\bpy_traceback.c(76): error C2065: 'PyId_lineno' : undeclared identifier
3>c:\blendersvn\blender\source\blender\python\intern\bpy_traceback.c(76): warning C4047: '=' : 'PyObject *' differs in levels of indirection from 'int'
3>c:\blendersvn\blender\source\blender\python\intern\bpy_traceback.c(85): error C2065: 'PyId_offset' : undeclared identifier
3>c:\blendersvn\blender\source\blender\python\intern\bpy_traceback.c(85): warning C4047: '=' : 'PyObject *' differs in levels of indirection from 'int'
3>c:\blendersvn\blender\source\blender\python\intern\bpy_traceback.c(99): error C2065: 'PyId_text' : undeclared identifier
3>c:\blendersvn\blender\source\blender\python\intern\bpy_traceback.c(99): warning C4047: '=' : 'PyObject *' differs in levels of indirection from 'int'
4>------ Build started: Project: blender, Configuration: Debug Win32 ------
4>  buildinfo.c
4>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Debug\bf_python.lib'
5>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------
5>  Build all projects
========== Build: 3 succeeded, 2 failed, 115 up-to-date, 0 skipped ==========
Please can someone help me get started.

Thanks in advance.

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv » Tue Oct 15, 2013 8:30 am

From the errors, it looks like you are missing the Python header files, although I would be expecting some explicit messages about that.

The other issue is you need a debug version of the Python lib in order to build debug. (It has been a while, but IIRC, you under Windows, you need to compile with everything either debug or not.)

mconradie
Posts: 0
Joined: Mon Oct 14, 2013 7:48 pm
Location: South Africa

Solved

Post by mconradie » Fri Oct 18, 2013 10:46 am

Eventually realized I was doing quite a few things incorrectly.

Firstly, I deleted everything in my SVN folder and started from scratch.

Secondly - I had originally been using MS Visual Studio 2010 Express and had used cmake to create the project files for 2010. The wiki says make for 2008, which I have now done. I actually just switched back to using VS 2008 Express.

Thirdly, I was building "ALL BUILD" rather than "INSTALL". Still had to build twice before it worked.

Lastly, I had to disable LIBMV and OPENCOLLADA as you need the VS 2008 Feature pack to use these - which is not compatible with the express versions of VS.

Yay! Finally working. Now if only it was written in C# rather than C++ ;)

Post Reply