Andriy Mytroshyn
Andriy Mytroshyn

Reputation: 221

Build Vulkan Tools for Windows

I'm trying to build a Vulkan Tools for Windows. For build I use:

    Windows 7 x64
    Visual Studio 2012
    cmake 3.6.1
    python 3.5

That parameter I set from the command prompt in windows bat file, during after CMake work I have the following error in CMakeError.log:

    LINK : fatal error LNK1104: cannot open file 'MSVCRTD.lib' .

When I open created CompilerIdCXX.vcxproj and try to build it I get the similar problem if I add a path to the required library it builds normally. In CMake file, I try to add the path to a library using command link_directories, after rerun cmake I got a similar problem to previous. By the way, after adding message system I see that cmake is stopped on command project.

Upvotes: 1

Views: 330

Answers (1)

Brainpain
Brainpain

Reputation: 186

(Edited to Provide VT Github link)

If you look at the BUILDVT.md file in the VulkanTools GitHub, you'll notice that it states that VS 2013 or newer is required. This is because some components of it use C++ 11 features, and 2013 support has some of that functionality more correctly implemented than 2012.

Getting back to the specific error you're stating is usually because it's trying to link to a lib that was built in Debug mode using a different Visual Studio than what you have installed. Even if you installed VS runtime components from 2013, they would not contain the debug libraries. What is likely your problem is that you have a Vulkan-1.lib/dll on your system built by VS 2013 and your VS 2012 doesn't like it.

There are two options available to you if this is the problem:

  1. Download either the VS 2013 Express version or VS 2015 Community Edition if you want to compile the Vulkan Tools items. Of course, if you work at a corporation, you'll need to buy one of those.
  2. Look into which library you're linking with that is complaining, and rebuild that with VS 2012. The caveat here is I'm not sure if Vulkan Tools will build properly with VS 2012 because of the C++ 11 usage.

Upvotes: 3

Related Questions