Caffe Error: Error C2220: Warning is considered an error-no "object" file was generated _caffe

Source: Internet
Author: User

This issue is my installation of the official Caffe,windows version of the problem, the specific error prompted as follows:

E:\nugetpackages\boost.1.59.0.0\lib\native\include\boost/format/alt_sstream_impl.hpp:error C2220: Warning is treated as error-no build " Object File (... \.. \src\caffe\util\math_functions.cpp)

Check on the Internet, this problem is still very common, because the Math_functions.cpp file code is in English, and our system is usually Chinese, that is, the coding method error. There are several ways to solve this problem

1, with Visual Studio directly open Math_functions.cpp, save can.

The following can be found Math_functions.cpp file right-click Open mode to select Visual Studio,ok. or open the Visual studio-> file-> open->math_functions.cpp save.

2. We notice that "warnings are treated as errors" in the error message, which means that this would have been a warning, but because we set the strict, the warning as a mistake, we relaxed our check error rules.

Turn on the Vs-> Project-> properties-> Configuration Properties->c/c++-> General-> treat warnings as errors to "no" and recompile.


Here's a note to remind you:

It's best to change this here to release, because I found that the default in the properties of the project is releases, and when we open Caffe.sln, the image defaults to Dubug, so we need the above modifications. In a word, two places to be consistent.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.