Does anybody build on Win32? I can't get any of the build options to work.

Does anybody here build in Win32? If so, which build method do you use because I’ve tried a couple and all end up with compile errors. Since there are so many different ways to build Blender on Windows, I’m wondering which is the best maintained or is known to work.

I’m a professional C/C++ developer and I have lots of experience with MSVC++ and GCC so I’m not afraid of the errors, I just want to know what actually works.

I have gotten Blender to build/run on MacOS following the directions and it works correctly.

On Win32 I have tried:

  • CMake + MSVC++ 2010 Express. This results in a linker error trying to link the “blender” project. The linker is looking for boost libraries that have “vc90” tags in them. It doesn’t make sense because I’ve searched all the project settings and all the linked libraries are supposed to be the “v100” variants.

  • MSVC++ 2010 Express + Scons on the command line. This one compiles most of the way but then blows up at the end complaining about unresolved external symbols like “std::_Throw”. I’m not sure how the compiler could be missing the standard C++ library. There is a dev note that when using MSVC++ 2008 you have to install a service pack to get the correct libs, but I don’t think this would help 2010.

  • GCC + MinGW + Scons. I didn’t get far with this one. I was trying to build in a cygwin environment and I think that was confusing the paths really badly. I’d have to download a native GCC build for Win32 and native MinGW to know if this one is really broken or if it is just Cygwin.

Any advice?

2010 has been dropped. I use both 2008(vc9)or 2012(vc11) with cmake and 2012 with scons

Ah that could explain in. Do you know when this happened? I’m working off 2.66a at the moment and all the documentation mentions VC 2010, not 2012.

I don’t think they ever really supported VC 2010, it looks like to me they tried but decided to just skip straight to 2012, and according to the documentation I read, they don’t support 2012 either. I’m pretty sure VC 2008 is the only supported version.

agoose77, is there anything specific that needs to be done to compile with VC 2012?

Compiling with VS 2012 is easy :wink:

  1. Get Blender Sources from SVN
  2. Check out the Windows_vc11 (or Win64_vc11 for x64) libs from svn
  3. Start scons with parameter MSVS_VERSION=11.0
  4. Enjoy :wink:

Yes, I’ll switch over to MSVC++ 2012 and see how that goes. I’m going to mark this one solved.
Thanks for the advice!

Good! Yes, as aforementioned just check out the VC11 builds, and make sure to clean CMAKE (File -> delete cache) so that you are asked for the compiler again. I notice some differences involving Python between Scons and CMake so be careful there :slight_smile:

Wow that is easy. Awesome, I’ve been using 2008 express cause I had read it was a huge bi*** to make 2012 work. I was even going to buy 2008 pro so i could build for a 64 bit. Glad I found this.
thanks guys

It actually was a huge bi*** to make VC 2012 work :wink: But now all the work is done and in SVN.
instead of buying 2008 pro you could just install a platform sdk (7.0 or 7.1) they include the 64 bit compilers :wink:

I did install it but i didn’t see how to do that… though I didn’t try very hard I figure for 100 bucks its worth buying pro.

Yes I actually did read how much of a bi*** it was Shadowrom, congrats to you for making it work. :slight_smile:

But since you are here, I am having a problem with my build, the compiler keeps getting hung up on makesdna.exe saying there are 86 unresolved externals. I’m pretty new to this so I’m not really sure what that means. The first time I tried it wanted me to add the path to python.h and pyconfig.h but I realized it was trying to read to win64 in the lib folder not win64_vc11 so I changed the name and it worked until makesdna.exe. Its saying LIBCMT.lib and a long list of unresolved external symbols. I’m just gonna keep trying different things but I am quite stumped and about out of things to try.

So I updated my source*(and changed win64_vc11 folder back to its original name) now the problem is in BLI_sys_types.h it says its changing Macro as it is invalid. Something to due with using a keyword as a macro.

Im using scons and windows 7 64 bit. :slight_smile:

Thanks Captain :wink:

This sound weird… how did you invoke the scons build?
And where did you put the libs and blender sources?

My directory tree looks like this:

D:\Blender_Dev
|
±---- blender
|
±---- libs
|
±— win64_vc11
|
±— windows_vc11

I invoke scons from MSVC 2012 console with:
cd Blender_Dev\blender
python.exe scons\scons.py MSVS_VERSION=11.0

everything should work fine then.
If you get errors please check if you have checked out the right libs from svn

I used the vc cross x64 command prompt when I got those errors, now I’m using the developer command prompt and it says vc version 9 not installed C/C++ compilers not set right. That seems likely I suppose I would think that running out of the VS2012 command prompt would make it compile with it but maybe I’m wrong?

This is what I’m getting now.

C:\BlenderSVN\blender>python scons\scons.py
scons: Reading SConscript files …
Command-line arguments
No command-line arguments given
Command-line targets
No targets given, using default

scons: warning: VC version 9.0 not installed. C/C++ compilers are most likely n
ot set correctly.
Installed versions are: [‘11.0’, ‘11.0Exp’]
File “C:\BlenderSVN\blender\SConstruct”, line 153, in <module>
Using config file: build_files\scons\config\win64-vc-config.py
Using user-config file: user-config.py
WindowsError: [Error 2] The system cannot find the file specified:
File “C:\BlenderSVN\blender\SConstruct”, line 219:
opts.Update(env)
File “C:\BlenderSVN\blender\scons\scons-local\SCons\Variables_init_.py”, li
ne 173:
exec open(filename, ‘rU’).read() in {}, values
File “<string>”, line 3:
None
File “C:\Python27\lib\subprocess.py”, line 711:
errread, errwrite)
File “C:\Python27\lib\subprocess.py”, line 948:
startupinfo)

C:\BlenderSVN\blender>

I added MSVS_VERSION=11.0 but now im just getting
Using config file: build_files\scons\config\win64-vc-config.py
Using user-config file: user-config.py
WindowsError: [Error 2] The system cannot find the file specified:
File “C:\BlenderSVN\blender\SConstruct”, line 219:
opts.Update(env)
File “C:\BlenderSVN\blender\scons\scons-local\SCons\Variables_init_.py”, li
ne 173:
exec open(filename, ‘rU’).read() in {}, values
File “<string>”, line 3:
None
File “C:\Python27\lib\subprocess.py”, line 711:
errread, errwrite)
File “C:\Python27\lib\subprocess.py”, line 948:
startupinfo)

Its defintly the win64_vc11 lib though. My directory tree is the same.
Out of curiosity the init file in the scons\config\Modules file is empty could that have been an error with the checkout or is that supposed to be like that?

This seems to be a problem with a missing python lib…
You should consider reinstalling your Python 2.7…

I think that would make three re-installs today. :slight_smile:

I always seem to have issues that mystically disappear by re-downloading and reinstalling.

Oh, so i’m not alone? :wink:
Welcome to Open Source development with Windows :smiley:

I seriously thought it was gonna work this time, I mean 40 something minutes into this and “fatal error LNK1158: cannot run ‘cutres.exe’”
I guess all that’s left is to delete and uninstall everything and start fresh…

seems that there’s something very wrong on your system…
A complete reinstall sounds promising :wink:

reinstalled and re-downloaded everything, same error :spin:

strange! But you did install Visual Studio 2012 Express for Windows Desktop, right?