happynear / happynear/caffe-windows

issue with caffelib.cpp

Open
#193 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.3k
Forks
637
PR merge metrics
No merged PRs in 30d

Description

Please use the [caffe-users list](https://groups.google.com/forum/#!forum/caffe-users) for usage, installation, or modeling questions, or other requests for help.
_Do not post such requests to Issues._ Doing so interferes with the development of Caffe.

Please read the [guidelines for contributing](https://github.com/BVLC/caffe/blob/master/CONTRIBUTING.md) before submitting this issue.

### Issue summary
I have 50 errors when building caffe classification:
5>------ Build started: Project: classification, Configuration: Release x64 ------
3> caffelib.cpp
3>caffelib.cpp(22): error C3699: '^': cannot use this indirection on type '_CaffeModel'
3> caffelib.cpp(22): note: compiler replacing '^' with '*' to continue parsing
3>caffelib.cpp(61): error C2976: 'std::array': too few template arguments
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(62): error C3699: '^': cannot use this indirection on type 'std::array'
3> caffelib.cpp(62): note: compiler replacing '^' with '*' to continue parsing
3>caffelib.cpp(68): error C2976: 'std::array': too few template arguments
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(68): error C3699: '^': cannot use this indirection on type 'std::array'
3> caffelib.cpp(68): note: compiler replacing '^' with '*' to continue parsing
3>caffelib.cpp(69): error C3699: '^': cannot use this indirection on type 'std::array'
3> caffelib.cpp(69): note: compiler replacing '^' with '*' to continue parsing
3>caffelib.cpp(127): error C2976: 'std::array': too few template arguments
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(128): error C3699: '^': cannot use this indirection on type 'std::array'
3> caffelib.cpp(128): note: compiler replacing '^' with '*' to continue parsing
3>caffelib.cpp(136): error C2976: 'std::array': too few template arguments
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(136): error C3699: '^': cannot use this indirection on type 'std::array'
3> caffelib.cpp(136): note: compiler replacing '^' with '*' to continue parsing
3>caffelib.cpp(137): error C3699: '^': cannot use this indirection on type 'std::array'
3> caffelib.cpp(137): note: compiler replacing '^' with '*' to continue parsing
3>caffelib.cpp(64): error C2976: 'std::array': too few template arguments
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(64): error C2027: use of undefined type 'std::array'
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(64): error C3536: 'outputs': cannot be used before it is initialized
3>caffelib.cpp(64): error C2109: subscript requires array or pointer type
3>caffelib.cpp(65): error C2440: 'return': cannot convert from 'int' to 'std::array *'
3> caffelib.cpp(65): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>caffelib.cpp(71): error C3285: for each statement cannot operate on variables of type 'std::array *'
3>caffelib.cpp(72): error C2065: 'name': undeclared identifier
3>caffelib.cpp(74): error C2976: 'std::array': too few template arguments
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(74): error C3699: '^': cannot use this indirection on type 'std::array'
3> caffelib.cpp(74): note: compiler replacing '^' with '*' to continue parsing
3>caffelib.cpp(74): error C2027: use of undefined type 'std::array'
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(78): error C2976: 'std::array': too few template arguments
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(78): error C2027: use of undefined type 'std::array'
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(78): error C3536: 'values': cannot be used before it is initialized
3>caffelib.cpp(78): error C2109: subscript requires array or pointer type
3>caffelib.cpp(79): error C3536: 'outputs': cannot be used before it is initialized
3>caffelib.cpp(79): error C2109: subscript requires array or pointer type
3>caffelib.cpp(81): error C2440: 'return': cannot convert from 'int' to 'std::array *'
3> caffelib.cpp(81): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>caffelib.cpp(106): error C2440: 'type cast': cannot convert from 'void *' to 'System::SByte ^'
3> caffelib.cpp(106): note: No user-defined-conversion operator available, or
3> caffelib.cpp(106): note: Cannot convert a native type to a managed type
3>caffelib.cpp(110): error C2440: 'initializing': cannot convert from 'char *' to 'System::SByte ^'
3> caffelib.cpp(110): note: No user-defined-conversion operator available, or
3> caffelib.cpp(110): note: Cannot convert a native type to a managed type
3>caffelib.cpp(118): error C2676: binary '++': 'System::SByte ^' does not define this operator or a conversion to a type acceptable to the predefined operator
3>caffelib.cpp(118): error C3192: syntax error: '^' is not a prefix operator (did you mean '*'?)
3>caffelib.cpp(132): error C2976: 'std::array': too few template arguments
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(132): error C2027: use of undefined type 'std::array'
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(132): error C3536: 'outputs': cannot be used before it is initialized
3>caffelib.cpp(132): error C2109: subscript requires array or pointer type
3>caffelib.cpp(133): error C2440: 'return': cannot convert from 'int' to 'std::array *'
3> caffelib.cpp(133): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
3>caffelib.cpp(141): error C3285: for each statement cannot operate on variables of type 'std::array *'
3>caffelib.cpp(142): error C2065: 'name': undeclared identifier
3>caffelib.cpp(144): error C2976: 'std::array': too few template arguments
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(144): error C3699: '^': cannot use this indirection on type 'std::array'
3> caffelib.cpp(144): note: compiler replacing '^' with '*' to continue parsing
3>caffelib.cpp(144): error C2027: use of undefined type 'std::array'
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(148): error C2976: 'std::array': too few template arguments
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(148): error C2027: use of undefined type 'std::array'
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3> F:\VS2015\VC\include\utility(363): note: see declaration of 'std::array'
3>caffelib.cpp(148): error C3536: 'values': cannot be used before it is initialized
3>caffelib.cpp(148): error C2109: subscript requires array or pointer type
3>caffelib.cpp(149): error C3536: 'outputs': cannot be used before it is initialized
3>caffelib.cpp(149): error C2109: subscript requires array or pointer type
3>caffelib.cpp(151): error C2440: 'return': cannot convert from 'int' to 'std::array *'
3> caffelib.cpp(151): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast

Anyone knows this error? Can anyone send me a correct version of caffelib.cpp?

### Steps to reproduce

If you are having difficulty building Caffe or training a model, please ask the caffe-users mailing list. If you are reporting a build error that seems to be due to a bug in Caffe, please attach your build configuration (either Makefile.config or CMakeCache.txt) and the output of the make (or cmake) command.

### Your system configuration
Operating system: WIN.81
Compiler: vs2015
CUDA version (if applicable): 8.0
CUDNN version (if applicable): 5.0
BLAS:
Python or MATLAB version (for pycaffe and matcaffe respectively):

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.