Skocz do zawartości
zuy_zgred

[C++] Działania na macierzach

Rekomendowane odpowiedzi

Próbował ktoś użyć tego w MS Visual Studio 2010?

 

Jak próbuję dołączyć Eigen to dostaję coś takiego przy kompilacji:

1>e:\program files (x86)\microsoft visual studio 10.0\vc\include\eigen\src/Core/util/Memory.h(756): error C3861: '__cpuidex': identifier not found

1>e:\program files (x86)\microsoft visual studio 10.0\vc\include\eigen\src/Core/util/Memory.h(785): error C3861: '__cpuidex': identifier not found

1>e:\program files (x86)\microsoft visual studio 10.0\vc\include\eigen\src/Core/util/Memory.h(872): error C3861: '__cpuidex': identifier not found

1>e:\program files (x86)\microsoft visual studio 10.0\vc\include\eigen\src/Core/util/Memory.h(875): error C3861: '__cpuidex': identifier not found

1>e:\program files (x86)\microsoft visual studio 10.0\vc\include\eigen\src/Core/util/Memory.h(889): error C3861: '__cpuidex': identifier not found

1>

 

Szukałem na różnych forach, ale nigdzie nie znalazłem rozwiązania :(

Udostępnij tę odpowiedź


Odnośnik do odpowiedzi
Udostępnij na innych stronach

Ten patch już jest w kodzie biblioteki, a dalej mam te błędy w VS 2010. W 2008 inne:

 

Compiling...test.cppe:\program files (x86)\microsoft visual studio 9.0\vc\include\eigen\src\core\densestorage.h(102) : error C2472: 'Eigen::DenseStorage::DenseStorage' cannot be generated in managed code: 'Aligned data types not supported in managed code'; compile with /clr to generate a mixed imagee:\program files (x86)\microsoft visual studio 9.0\vc\include\eigen\src\core\plainobjectbase.h(396) : error C2472: 'Eigen::PlainObjectBase >::PlainObjectBase >' cannot be generated in managed code: 'Aligned data types not supported in managed code'; compile with /clr to generate a mixed imagee:\program files (x86)\microsoft visual studio 9.0\vc\include\eigen\src\core\matrix.h(217) : error C2472: 'Eigen::Matrix::Matrix' cannot be generated in managed code: 'Aligned data types not supported in managed code'; compile with /clr to generate a mixed imaged:\programowanie\mmm\projekt vs 2008\test\test\form1.h(74) : error C2472: 'test::Form1::Form1_Load' cannot be generated in managed code: 'Aligned data types not supported in managed code'; compile with /clr to generate a mixed image

Błędy wyskakują dopiero gdy chcę utworzyć macierz, samo dodanie nagłówków nie przeszkadza kompilatorowi.

 

Próbowałem kompilować z /clr ale jest jeszcze więcej błędów:

 

Compiling...MMM Projekt.cpp.\MMM Projekt.cpp(3) : error C2855: command-line option '/clr:pure' inconsistent with precompiled header.\MMM Projekt.cpp(3) : warning C4651: '/D_M_CEE_PURE=001' specified for precompiled header but not for current compileE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(38) : error C3821: 'va_list': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(38) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(40) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(41) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(42) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(44) : error C3821: 'int swprintf(wchar_t *,size_t,const wchar_t *,...)': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(62) : error C3821: 'va_list': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(62) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(64) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(65) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(66) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(68) : error C3821: 'int _swprintf_l(wchar_t *,size_t,const wchar_t *,_locale_t,...)': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(87) : error C3821: 'va_list': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(87) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(88) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(89) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(90) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(92) : error C3821: 'int swprintf(wchar_t *,const wchar_t *,...)': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(107) : error C3821: 'va_list': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(107) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(108) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(109) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(110) : error C3821: '_Arglist': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl(112) : error C3821: 'int _swprintf_l(wchar_t *,const wchar_t *,_locale_t,...)': managed type or function cannot be used in an unmanaged functionE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdexcept(254) : warning C4382: throwing 'std::length_error' : a type with __clrcall destructor or copy constructor can only be caught in /clr:pure moduleE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdexcept(260) : warning C4382: throwing 'std::out_of_range' : a type with __clrcall destructor or copy constructor can only be caught in /clr:pure moduleE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdexcept(266) : warning C4382: throwing 'std::invalid_argument' : a type with __clrcall destructor or copy constructor can only be caught in /clr:pure moduleE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xlocinfo(78) : warning C4382: throwing 'std::runtime_error' : a type with __clrcall destructor or copy constructor can only be caught in /clr:pure moduleE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xlocinfo(88) : warning C4382: throwing 'std::runtime_error' : a type with __clrcall destructor or copy constructor can only be caught in /clr:pure moduleE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xlocinfo(108) : warning C4382: throwing 'std::runtime_error' : a type with __clrcall destructor or copy constructor can only be caught in /clr:pure moduleE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xlocale(361) : warning C4382: throwing 'std::runtime_error' : a type with __clrcall destructor or copy constructor can only be caught in /clr:pure moduleE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xlocale(380) : warning C4382: throwing 'std::runtime_error' : a type with __clrcall destructor or copy constructor can only be caught in /clr:pure moduleE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xlocale(1368) : warning C4382: throwing 'std::out_of_range' : a type with __clrcall destructor or copy constructor can only be caught in /clr:pure moduleE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xiosbase(292) : warning C4382: throwing 'std::ios_base::failure' : a type with __clrcall destructor or copy constructor can only be caught in /clr:pure moduleE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xiosbase(294) : warning C4382: throwing 'std::ios_base::failure' : a type with __clrcall destructor or copy constructor can only be caught in /clr:pure moduleE:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xiosbase(296) : warning C4382: throwing 'std::ios_base::failure' : a type with __clrcall destructor or copy constructor can only be caught in /clr:pure modulee:\program files (x86)\microsoft visual studio 9.0\vc\include\eigen\src/Core/util/Memory.h(88) : warning C4382: throwing 'std::bad_alloc' : a type with __clrcall destructor or copy constructor can only be caught in /clr:pure module

 

 

 

edit:

Chyba jestem bliżej:

Compiling...MMM Projekt.cppd:\uczing\mmm\projekt vs 2008\mmm projekt\mmm projekt\Form1.h(357) : error C3821: 'void MMMProjekt::Form1::symulujButton_Click(System::Object ^,System::EventArgs ^)': managed type or function cannot be used in an unmanaged function        Aligned data types not supported in managed coded:\uczing\mmm\projekt vs 2008\mmm projekt\mmm projekt\Form1.h(356) : error C3645: 'MMMProjekt::Form1::symulujButton_Click' : __clrcall cannot be used on functions compiled to native code
Edytowane przez koloboss

Udostępnij tę odpowiedź


Odnośnik do odpowiedzi
Udostępnij na innych stronach

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Gość
Dodaj odpowiedź do tematu...

×   Wklejono zawartość z formatowaniem.   Przywróć formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

Ładowanie


×
×
  • Dodaj nową pozycję...