falvaro / seshat

Handwritten math expression parser
GNU General Public License v3.0
678 stars 166 forks source link

Tuple is ambiguous #16

Open shrnt opened 6 years ago

shrnt commented 6 years ago

After connecting my boost library, I get this error, along with a lot of other errors.

Scanning dependencies of target seshat_master
[  7%] Building CXX object CMakeFiles/seshat_master.dir/rnnlib4seshat/Mdrnn.cpp.obj
[ 11%] Building CXX object CMakeFiles/seshat_master.dir/rnnlib4seshat/DataExporter.cpp.obj
[ 14%] Building CXX object CMakeFiles/seshat_master.dir/rnnlib4seshat/ClassificationLayer.cpp.obj
[ 14%] Building CXX object CMakeFiles/seshat_master.dir/rnnlib4seshat/Layer.cpp.obj
In file included from D:\Downloads\seshat-master\rnnlib4seshat\MultiArray.hpp:30:0,
                 from D:\Downloads\seshat-master\rnnlib4seshat\SeqBuffer.hpp:23,
                 from D:\Downloads\seshat-master\rnnlib4seshat\Layer.hpp:48,
                 from D:\Downloads\seshat-master\rnnlib4seshat\Layer.cpp:40:
D:\Downloads\seshat-master\rnnlib4seshat\Helpers.hpp:154:15: error: reference to 'tuple' is ambiguous
 typedef const tuple<real_t&, real_t&, real_t&, real_t&>& TDDDD;
               ^~~~~
In file included from D:/Downloads/boost_1_65_1/boost_1_65_1/boost/tuple/tuple.hpp:28:0,
                 from D:/Downloads/boost_1_65_1/boost_1_65_1/boost/assign/list_of.hpp:22,
                 from D:\Downloads\seshat-master\rnnlib4seshat\Layer.hpp:43,
                 from D:\Downloads\seshat-master\rnnlib4seshat\Layer.cpp:40:
D:/Downloads/boost_1_65_1/boost_1_65_1/boost/tuple/detail/tuple_basic.hpp:81:7: note: candidates are: template<class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9> class boost::tuples::tuple
 class tuple;

does this mean I did not link the boost library properly? Or is there something missing? In my cmake file, I have this

SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "D:/Downloads/boost_1_65_1/boost_1_65_1")
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "D:/Downloads/boost_1_65_1/boost_1_65_1/lib")

find_package(boost COMPONENTS system filesystem REQUIRED)

if(Boost_FOUND)

    message(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
    message(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}")
    message(STATUS "Boost_VERSION: ${Boost_VERSION}")

    include_directories(${Boost_INCLUDE_DIRS})

endif()

and it does manage to find the Boost library.

also when I make from terminal, I get this error:

g++ -c online.cc -O3 -Wno-unused-result -ID:/Downloads/boost_1_65_1/boost_1_65_1
online.cc: In member function 'int stroke::F_XMIN()':
online.cc:60:12: error: 'INT_MAX' was not declared in this scope
   int xmin=INT_MAX;
            ^~~~~~~
online.cc: In member function 'int stroke::F_XMAX()':
online.cc:67:12: error: 'INT_MIN' was not declared in this scope
   int xmax=INT_MIN;
            ^~~~~~~
make: *** [online.o] Error 1

any ideas?

danipozo commented 6 years ago

There are a couple of pull requests solving this problem now, namely #18 and #20.