First, the Environment preparation
1.Windows 8.1 System
2.Visual Studio Ultimate
Visual Studio Ultimate:
Visual Studio Ultimate Update 5 Get the address for free:
Http://download.microsoft.com/download/9/3/E/93EA27FF-DB02-4822-8771-DCA0238957E9/vs2013.5_ult_chs.iso?type=ISO
Ii. Visual Studio Ultimate Installation Tutorial (install + register)
- After waiting for the download to complete, although the download file is in iOS format, we can unzip the open with the Unzip tool. After unpacking, double-click Vs_ultimate.exe to start the installation. The old and new versions of VS can coexist, but during the installation, the old version of VS must be closed first.
- When customizing the Select installation path, be aware that the owning path has sufficient headroom, or the installation will fail, agree to the license terms, and proceed to the next step.
- Choose the optional features of the installation here, you can check according to your needs, or you can select all by default. Put the mouse on the text, will pop up each function detailed description . Select the usual features, and also pay attention to the reserved space to start the installation.
- Wait about 30 minutes before you can complete the installation. During installation, vs consumes a lot of system resources, so it's best not to turn on other software and wait for the installation.
- The first time you open VS2013, you need to do some basic configuration, such as development settings, color themes, settings according to your needs, and then wait a few minutes to use. Because VS2013 introduces a networked IDE experience, you can sign in with Microsoft's account, and it automatically synchronizes settings on devices that use the networked IDE experience, including shortcuts, visual Studio skins (themes, fonts, and so on) for various categories of sync settings.
- Finally, to register VS, or the software is a 30-day trial period. Open the VS2013, find the Help tab in the toolbar, click Register Product, a dialog will pop up, which will show the registration status of the software.
- Click Change my product license, a dialog will pop up asking you to enter your product key. At this point, a product key is required to provide a usable key: Vs2013_rtm_ult_chs KEY:BWG7X-J98B3-W34RT-33B3R-JVYW
- If the key fails, we have to go to the Internet to search. After successful registration, all operations are basically completed and can be used normally.
Third, download Microsoft/caffe source code
Address:Https://github.com/microsoft/caffe
Once the link is open, click Clone or download directly in the page
Iv. Compiling Caffe Source code
1. Unzip the source code (I installed on the D drive, according to personal habits installed on which disk, do not advocate installation on the C drive)
2. Enter the catalogue D:\caffe-master\windows
Copy , paste, and rename the file "CommonSettings.props.exemple" to "Commonsetting.props"
When doing this, someone may encounter such a problem, how to modify the suffix name of the file?
Tip: How to modify a file's suffix name (W8.1 system)
1) in win8.1, double-click "This computer" in the interface to open the resource manager. Click the "View" option in the navigation bar, and tick the "File extension" check box button.
2) The file suffix name or file extension will appear after this file.
3) Right-click the file to which you want to modify the extension, and then select the Rename option in the list.
4) then enter the new extension, mouse click on the desktop blank place. Click the "Yes" button in the pop-up window.
3. Open the file "Commonsetting.props", bold font for the modified content, the modified position should be opened in WordPad, the file's 第9-10 line, the following changes:
<CpuOnlyBuild>true</CpuOnlyBuild>
<UseCuDNN>false</UseCuDNN>
4. Double-click "Caffe.sln" in the D:\caffe-master\windows\ directory to automatically open the installed vs2013.
5. Click the VS2013 " build " menu and click "Rebuild solution ".
Start a long time compiling process, please wait patiently, Microsoft will automatically help us to generate all the dependent packages. The dependent packages are all in the folder D:\NugetPackages.
V. Issues that may arise in the compilation
Error C2220: warning is treated as error - No "libcaffe.lib" generated
A blogger solved this problem, blog address :http://blog.csdn.net/sunshine_in_moon/article/details/51426073
A warning appears during compilation, and the compiler treats the warning as an error.
Workaround:
1) Click " Project"--"Libcafee Property", "Change warning to error " to No.
2) After modifying, click Build -- Clear Solution , and then click Build -- Build Solution .
Six , after successful compilation, the executable. exe is generated and stored in the following directory
D:\caffe-master\Build\x64\Release or d\caffe-master\build\x64\debug
Windows 8.1 under Caffe Environment building