Can't build Blender with Visual Studio Express/CMake

I’m not able to get CMake to complete as described in this document: http://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Windows/msvc/CMake.

After getting everything set up, I started the CMake gui and clicked the ‘Configure’ button. I got the following error:

The C compiler identification is MSVC 18.0.31101.0

The CXX compiler identification is MSVC 18.0.31101.0

Check for working C compiler using: Visual Studio 12 2013

Check for working C compiler using: Visual Studio 12 2013 – works

Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 12 2013
Check for working CXX compiler using: Visual Studio 12 2013 – works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
CMake Error at blender/editors/datafiles/CMakeLists.txt:34 (data_to_c_simple):
Unknown CMake command “data_to_c_simple”.

CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.1)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run “cmake --help-policy CMP0000”.
This warning is for project developers. Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!
See also “C:/dev/git.blender.org/build/CMakeFiles/CMakeOutput.log”.
See also “C:/dev/git.blender.org/build/CMakeFiles/CMakeError.log”.

Any tips on how to fix this?

Attachments


logFiles.zip (3.01 KB)

I’m having exactly the same issue when I try to build the Windows x64 version with CMake and Visual Studio. I hope someone has an answer to this question because I’d love to start building my own blender and possibly write some code too.

I just followed the same procedure on Windows 7 32-bit and all went fine, this might be specific to 64-bit systems. You may have a wrong bit version of something you downloaded. That is all I can tell you and anyone else who may be able to help.

You might also want to edit your post indicating which version of Windows 64 bit you have, “Windows XP”, “Windows Vista”, “Windows 7”, or “Windows 8.1” as it will help others answer your question better.

I just looked at your log files and it seems that you have a 32-bit version of Visual Studio 12 2013 installed on your system, I gather that from the " C:\Program Files (x86)" in your logs, if it was VS 2013 64-bit it would not have the (x86) in the path of “Program Files”. This may be why you are recieving this error. I don’t believe you can use Visual Studio 12 2013 32-bit to build 64-bit code if it is an Express or Community version.

It is noted on the instruction page the following

Hint: As far as i know, VS-20013 express is only available as a 32 bit application, so you might get into trouble when you try to build the Cuda binaries (due to build complexity more than 4 Gbyte memory are needed which can not be provided by the express version).

So you may have to start over and go with the 32-bit instructions if using Express/Community edition which works fine. I did not install that cuda dependancy and just produced a successfull build with VS Express 12 2013.

I read the same thing, you can’t build an x64 version with the free version. That’s why I don’t bother building my own.

I have started over again and got the correct build (32 bit) due to the 2013 VS Express limitation of not working with 64 bit and I’ve pointed CMake to the correct locations on files not found but now I get an error with this output from CMake :

32 bit compiler detected. CMake Warning at CMakeLists.txt:1320 (find_package):
By not providing “FindFFMPEG.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “FFMPEG”, but
CMake did not find one.

Could not find a package configuration file provided by “FFMPEG” with any
of the following names:

FFMPEGConfig.cmake
ffmpeg-config.cmake

Add the installation prefix of “FFMPEG” to CMAKE_PREFIX_PATH or set
“FFMPEG_DIR” to a directory containing one of the above files. If “FFMPEG”
provides a separate development package or SDK, be sure it has been
installed.

CMake Warning at CMakeLists.txt:1322 (message):
Using HARDCODED ffmpeg locations

Boost version: 1.55.0
Found the following Boost libraries:
date_time
filesystem
thread
regex
system
wave
locale
CMake Warning at CMakeLists.txt:1470 (message):
LLVM debug libs not present on this system. Using release libs for debug
builds.

CMake Error at CMakeLists.txt:2130 (message):
Apple and Windows require pre-compiled libs at:
‘C:/Blender_DEV/blender/…/lib/windows_vc12’

Configuring incomplete, errors occurred!
See also “C:/Blender_DEV/blender_win32/CMakeFiles/CMakeOutput.log”.

I got to compile in windows 64bits with VS2013 Express and CMake. I had to make several times, but it worked. I think you need Visual Studio Tools.

I could not compile with CUDA, but the rest works. If you select CUDA_BINARIES you get an error.

It’s important that you have Git installed in the path and with the option to run from command not only Bash.

About if VS2013 is 32 bits or not, my understanding is that the free version of VS is 32 bits but it can compile 64bits with some limitations (not bigger than 4GB).

Be sure to install all dependencies of here: http://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Windows/msvc/CMake

I’m new compiling Blender and this is the result of my own testing.