Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

build error under windows using VS2015 #1283

Open
Thanh-Binh opened this issue Apr 23, 2017 · 5 comments
Open

build error under windows using VS2015 #1283

Thanh-Binh opened this issue Apr 23, 2017 · 5 comments

Comments

@Thanh-Binh
Copy link

By building the current version with VS2015 I have found the following problems:

  1. in SparseMatrix, SparseBinaryMatrix please do NOT use
    using Serializable::write;
    using Serializable::read;
    I remember, I have discussed with @rcrowder last year, but it is not fixed.

  2. In Topology.cpp, it is not allowed to use std::max() for special data type of nupic.
    For example in the line 101
    offset_[i] = std::max((Int)offset_[i], -(Int)neighborhood_.centerPosition_[i]);
    -->
    offset_[i] = offset_[i] < -(Int)neighborhood_.centerPosition_[i] ? -(Int)neighborhood_.centerPosition_[i] : offset_[i];

line 152:
offset_[i] = std::max(-(Int)neighborhood_.radius_, -(Int)neighborhood_.centerPosition_[i]);
-->
if (-neighborhood_.radius_ < -neighborhood_.centerPosition_[i]) offset_[i] = -neighborhood_.centerPosition_[i];
else offset_[i] = -neighborhood_.radius_;
3. there are a lot of error by unit test, like
const UInt zeroColumns[0] = {}; //not allowed
vector var = {1.0, 1.2};

@rhyolight
Copy link
Member

rhyolight commented Apr 24, 2017

We build nupic.core on Windows in AppVeyor. But we do not build it on VisualStudio. I'm sorry I don't know how to fix this problem, and we probably won't work on it anytime soon because there is so much going on in research.

@Thanh-Binh
Copy link
Author

@rhyolight i have already suggested solution for each problem, but i need someone to review and update in the repository. I have tested in windowswith vs2015 and ubuntu

@rhyolight
Copy link
Member

@Thanh-Binh Why don't you create a pull request with your changes, and uncomment these lines. If it works, it should pass in AppVeyor.

@Thanh-Binh
Copy link
Author

@rhyolight i will do that soon...

@Thanh-Binh
Copy link
Author

Today I tried to build again with VS2015 64bits, and have many errors, which I really do not understand like:

11>------ Build started: Project: nupic_core_solo, Configuration: Debug x64 ------
11>  ArrayProto.capnp.c++
11>  TemporalMemoryProto.capnp.c++
11>  NumpyArrayObject.cpp
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\npy_common.h(164): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\npy_common.h(164): error C2146: syntax error: missing ';' before identifier 'npy_intp'
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\npy_common.h(165): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\npy_common.h(165): error C2146: syntax error: missing ';' before identifier 'npy_uintp'
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\npy_common.h(949): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\npy_common.h(949): error C2146: syntax error: missing ';' before identifier 'npy_half'
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\npy_common.h(950): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\npy_common.h(950): error C2378: 'npy_half': redefinition; symbol cannot be overloaded with a typedef
11>  c:\programs\python27\lib\site-packages\numpy\core\include\numpy\npy_common.h(949): note: see declaration of 'npy_half'
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\npy_common.h(950): error C2146: syntax error: missing ';' before identifier 'npy_float16'
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\ndarraytypes.h(363): error C2143: syntax error: missing ';' before '*'
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\ndarraytypes.h(363): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\ndarraytypes.h(366): error C2061: syntax error: identifier 'npy_intp'
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\ndarraytypes.h(379): error C2061: syntax error: identifier 'npy_intp'
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\ndarraytypes.h(381): error C2061: syntax error: identifier 'npy_intp'
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\ndarraytypes.h(384): error C2061: syntax error: identifier 'npy_intp'
11>c:\programs\python27\lib\site-packages\numpy\core\include\numpy\ndarraytypes.h(391): error C2065: 'FILE': undeclared identifier

Any idea for solving this problem.... Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants