Проблемы с Eigen Tensor: конфликтующие объявления

Я только что попытался протестировать модуль Eigen Tensor в CodeBlocks 16.01 с GCC 4.9. По предложению http://eigen.tuxfamily.org/index.php?title=Tensor_support Я добавил -std = c ++ 0x, -std = c ++ 11 или -std = c ++ 1y в качестве флагов компилятора, но я не могу заставить его работать. Уже

#include <unsupported/Eigen/CXX11/Tensor>

выдает сообщение об ошибке в зависимости от флагов, которые я использую. В случае -std = c ++ 0x или -std = c ++ 11

||=== Build: Debug in Test (compiler: GNU GCC Compiler) ===|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\Tensor|52|error: conflicting declaration 'typedef long int int32_t'|
C:\Program Files (x86)\CodeBlocks\MinGW\include\stdint.h|31|note: previous declaration as 'typedef int int32_t'|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\Tensor|53|error: conflicting declaration 'typedef long unsigned int uint32_t'|
C:\Program Files (x86)\CodeBlocks\MinGW\include\stdint.h|32|note: previous declaration as 'typedef unsigned int uint32_t'|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|

и в случае -std = c ++ 1y я получаю дополнительные сообщения об ошибках:

||=== Build: Debug in Test (compiler: GNU GCC Compiler) ===|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\util\IntegralConstant.h|187|error: template declaration of 'const Eigen::internal::FixedInt<N> Eigen::fix'|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\util\IndexedViewHelper.h|63|error: 'fix' was not declared in this scope|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\util\IndexedViewHelper.h|63|error: expected primary-expression before ')' token|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\ArithmeticSequence.h|142|error: 'fix' was not declared in this scope|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\ArithmeticSequence.h|142|error: 'fix' was not declared in this scope|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\ArithmeticSequence.h|142|error: expected primary-expression before ')' token|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\ArithmeticSequence.h||In member function 'decltype (Eigen::seqN((((const Eigen::ArithmeticSequence<FirstType, SizeType, IncrType>*)this)->Eigen::ArithmeticSequence<FirstType, SizeType, IncrType>::m_first + ((((((const Eigen::ArithmeticSequence<FirstType, SizeType, IncrType>*)this)->Eigen::ArithmeticSequence<FirstType, SizeType, IncrType>::m_size + <expression error>) < (-1)) > <expression error>) * ((const Eigen::ArithmeticSequence<FirstType, SizeType, IncrType>*)this)->Eigen::ArithmeticSequence<FirstType, SizeType, IncrType>::|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\ArithmeticSequence.h|143|error: 'fix' was not declared in this scope|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\ArithmeticSequence.h|143|error: expected primary-expression before ')' token|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\ArithmeticSequence.h|207|error: 'fix' was not declared in this scope|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\ArithmeticSequence.h|207|error: 'fix' was not declared in this scope|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\ArithmeticSequence.h|207|error: expected primary-expression before ')' token|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\ArithmeticSequence.h||In function 'decltype (Eigen::seqN((typename Eigen::internal::cleanup_index_type<FirstType>::type)(f), (((((typename Eigen::internal::cleanup_index_type<SizeType>::type)(l) - (typename Eigen::internal::cleanup_index_type<FirstType>::type)(f)) + <expression error>) < 1) > <expression error>))) Eigen::seq(FirstType, LastType)':|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\ArithmeticSequence.h|211|error: 'fix' was not declared in this scope|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\..\..\..\Eigen\src\Core\ArithmeticSequence.h|211|error: expected primary-expression before ')' token|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\Tensor|52|error: conflicting declaration 'typedef long int int32_t'|
C:\Program Files (x86)\CodeBlocks\MinGW\include\stdint.h|31|note: previous declaration as 'typedef int int32_t'|
C:\Program Files (x86)\CodeBlocks\eigen-eigen-c2947c341c68\unsupported\Eigen\CXX11\Tensor|53|error: conflicting declaration 'typedef long unsigned int uint32_t'|
C:\Program Files (x86)\CodeBlocks\MinGW\include\stdint.h|32|note: previous declaration as 'typedef unsigned int uint32_t'|
||=== Build failed: 15 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|

Любые идеи о том, что я сделал не так или как это исправить?
заранее спасибо

2

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы [email protected]