Debian 6. Biblioteka Boost zainstalowała się, ale się nie zainstalowała?!

2013-10-05 05:12
cx3
0

Witam.

Ściągnąłem bibliotekę Boost dla Linuxa (Debian 6). Rozpakowałem archiwum, jako root odpaliłem bootsrap.sh w terminalu, następnie wg tutoriala odpaliłem w katalogu głównym rozpakowanego Boost'a polecenie ./b2 .

Zaczęły rozpakowywać się paczki, instalacja przebiegła jak należy. Zaczynam pisać program za pomocą tutka. Kompilator nic nie wie nt. pliku nagłówkowego

#include<boost/multiprecison/gmp.hpp>

Wywalił mnóstwo błędów. Nie używam żadnego środowiska (np. Code::Blocks) a jedynie JEdit i skrypt kompilujący w tym samym katalogu co main.cpp.

Przeglądając bootsrap.sh patrzyłem się gdzie biblioteka się zainstaluje. Rzekomo w usr/local. Ani śladu. Za pomocą Synaptic'a odinstalowałem wszystkie paczki Boost;a, następnie ściągnąłem libboost-all-dev wersję 1.42.01. z nadzieją, że nie będzie większych komplikacji. Przeglądałem znowuż usr/local i inne katalogi i po Boost ani śladu.

Wiem, jest masa informacji na necie jak zainstalować, wolę jednak zapytać Szanowną Społeczność, co robię źle? Być może ktoś miał podobne perypetie.

Generalnie zależy mi na bibliotece multiprecision, choć całym Boostem nie pogardzę. Pod Ubuntu 12.10 nie miałem problemów z instalacją, reinstalacja do Ubuntu nie wchodzi w grę.

Cały kod źródłowy:

#include <boost/multiprecision/gmp.hpp>
#include <iostream>

using namespace boost::multiprecision;
using namespace std;

int main(){  
   mpz_int v = 1;

   for (unsigned i=1;  i<100;  ++i)  v*=i;      

   cout << v << endl;}

   char c; //pause
   cin >> c;

Część błędów kompilatora (nie wszystkie zmieściły się w terminalu!)

/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2103: error: ‘boost::multiprecision::detail’ has not been declared/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2103: error: ‘get_default_precision’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2103: error: ‘mpf_init2’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2104: error: ‘struct boost::multiprecision::backends::gmp_float<0u>’ has no member named ‘data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2104: error: ‘const struct boost::multiprecision::backends::gmp_rational’ has no member named ‘data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2104: error: ‘mpf_set_q’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp: In member function ‘boost::multiprecision::backends::gmp_float<0u>& boost::multiprecision::backends::gmp_float<0u>::operator=(const boost::multiprecision::backends::gmp_int&)’:/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2108: error: ‘struct boost::multiprecision::backends::gmp_float<0u>’ has no member named ‘m_data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2109: error: ‘struct boost::multiprecision::backends::gmp_float<0u>’ has no member named ‘m_data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2109: error: ‘boost::multiprecision::detail’ has not been declared/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2109: error: ‘struct boost::multiprecision::backends::gmp_float<0u>’ has no member named ‘get_default_precision’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2109: error: ‘mpf_init2’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2110: error: ‘struct boost::multiprecision::backends::gmp_float<0u>’ has no member named ‘data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2110: error: ‘const struct boost::multiprecision::backends::gmp_int’ has no member named ‘data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2110: error: ‘mpf_set_z’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp: In member function ‘boost::multiprecision::backends::gmp_float<0u>& boost::multiprecision::backends::gmp_float<0u>::operator=(const boost::multiprecision::backends::gmp_rational&)’:/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2115: error: ‘struct boost::multiprecision::backends::gmp_float<0u>’ has no member named ‘m_data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2116: error: ‘struct boost::multiprecision::backends::gmp_float<0u>’ has no member named ‘m_data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2116: error: ‘boost::multiprecision::detail’ has not been declared/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2116: error: ‘struct boost::multiprecision::backends::gmp_float<0u>’ has no member named ‘get_default_precision’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2116: error: ‘mpf_init2’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2117: error: ‘struct boost::multiprecision::backends::gmp_float<0u>’ has no member named ‘data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2117: error: ‘const struct boost::multiprecision::backends::gmp_rational’ has no member named ‘data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2117: error: ‘mpf_set_q’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp: In constructor ‘boost::multiprecision::backends::gmp_int::gmp_int(const boost::multiprecision::backends::gmp_rational&)’:/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2122: error: ‘struct boost::multiprecision::backends::gmp_int’ has no member named ‘m_data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2122: error: ‘mpz_init’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2123: error: ‘struct boost::multiprecision::backends::gmp_int’ has no member named ‘m_data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2123: error: ‘const struct boost::multiprecision::backends::gmp_rational’ has no member named ‘data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2123: error: ‘mpz_set_q’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp: In member function ‘boost::multiprecision::backends::gmp_int& boost::multiprecision::backends::gmp_int::operator=(const boost::multiprecision::backends::gmp_rational&)’:/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2127: error: ‘struct boost::multiprecision::backends::gmp_int’ has no member named ‘m_data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2128: error: ‘struct boost::multiprecision::backends::gmp_int’ has no member named ‘m_data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2128: error: ‘mpz_init’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2129: error: ‘struct boost::multiprecision::backends::gmp_int’ has no member named ‘m_data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2129: error: ‘const struct boost::multiprecision::backends::gmp_rational’ has no member named ‘data’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2129: error: ‘mpz_set_q’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp: At global scope:/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2140: error: ‘component_type’ is not a template/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2140: error: ‘number’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2140: error: expected unqualified-id before ‘>’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2145: error: ‘expression_template_option’ has not been declared/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2146: error: expected initializer before ‘<’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2152: error: ‘expression_template_option’ has not been declared/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2153: error: expected initializer before ‘<’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2180: error: ‘number_category’ is not a template/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2180: error: ‘canonical’ is not a member of ‘boost::detail’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2180: error: ‘canonical’ is not a member of ‘boost::detail’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2180: error: ‘mpz_t’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2180: error: ‘type’ in class ‘boost::multiprecision::number_category’ does not name a type/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2180: error: expected unqualified-id before ‘>’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2182: error: ‘number_category’ is not a template/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2182: error: ‘canonical’ is not a member of ‘boost::detail’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2182: error: ‘canonical’ is not a member of ‘boost::detail’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2182: error: ‘mpq_t’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2182: error: ‘type’ in class ‘boost::multiprecision::number_category’ does not name a type/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2182: error: expected unqualified-id before ‘>’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2184: error: ‘number_category’ is not a template/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2184: error: ‘canonical’ is not a member of ‘boost::detail’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2184: error: ‘canonical’ is not a member of ‘boost::detail’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2184: error: ‘mpf_t’ was not declared in this scope/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2184: error: ‘type’ in class ‘boost::multiprecision::number_category’ does not name a type/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2184: error: expected unqualified-id before ‘>’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2187: error: expected initializer before ‘<’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2188: error: expected initializer before ‘<’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2189: error: expected initializer before ‘<’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2190: error: expected initializer before ‘<’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2191: error: expected initializer before ‘<’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2192: error: expected initializer before ‘<’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2193: error: expected initializer before ‘<’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2202: error: ‘boost::multiprecision::expression_template_option’ has not been declared/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2203: error: ‘number’ is not a member of ‘boost::multiprecision’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2203: error: ‘number’ is not a member of ‘boost::multiprecision’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2203: error: wrong number of template arguments (2, should be 1)/usr/include/c++/4.4/limits:278: error: provided for ‘template<class _tp="_Tp"> struct std::numeric_limits’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2203: error: expected unqualified-id before ‘>’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2310: error: ‘boost::multiprecision::expression_template_option’ has not been declared/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2311: error: ‘number’ is not a member of ‘boost::multiprecision’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2311: error: ‘number’ is not a member of ‘boost::multiprecision’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2311: error: wrong number of template arguments (2, should be 1)/usr/include/c++/4.4/limits:278: error: provided for ‘template<class _tp="_Tp"> struct std::numeric_limits’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2311: error: expected nested-name-specifierIn file included from main.cpp:1:/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2313: error: ‘boost::multiprecision::expression_template_option’ has not been declared/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2314: error: ‘number’ is not a member of ‘boost::multiprecision’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2314: error: ‘number’ is not a member of ‘boost::multiprecision’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2314: error: wrong number of template arguments (2, should be 1)/usr/include/c++/4.4/limits:278: error: provided for ‘template<class _tp="_Tp"> struct std::numeric_limits’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2314: error: expected unqualified-id before ‘>’ token/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2354: error: ‘boost::multiprecision::expression_template_option’ has not been declared/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2355: error: expected constructor, destructor, or type conversion before ‘int’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2356: error: ‘boost::multiprecision::expression_template_option’ has not been declared/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2357: error: expected constructor, destructor, or type conversion before ‘int’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2358: error: ‘boost::multiprecision::expression_template_option’ has not been declared/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2359: error: expected constructor, destructor, or type conversion before ‘int’/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2360: error: ‘boost::multiprecision::expression_template_option’ has not been declared/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2361: error: expected constructor, destructor, or type conversion before ‘bool’

Błąd linkera?

Z góry dziękuję za wszelkie porady i pozdrawiam

pozdro,
cx3

poprawienie znaczników <code class="cpp"> - fp


C++ ftw!
edytowany 2x, ostatnio: furious programming, 2013-10-05 14:40

Pozostało 580 znaków

2013-10-05 10:34
0

/home/cx3/boost_1_54_0/boost/multiprecision/gmp.hpp:2103: error: ‘boost::multiprecision::detail’ has not been declared

Skoro dostałeś błąd z gmp.hpp to nie możesz mówić, że nic nie wie o tym nagłówku.
Poza tym masz jak wół ścieżkę do tego pliku. Komunikaty trzeba czasem przeczytać...

nie wszystkie zmieściły się w terminalu!
To zmień terminal. Potrzebny jest początek.

Błąd linkera?
Nie.

Albo niech wklei do schowka bezpośrednio z terminala. - hauleth 2013-10-05 11:15

Pozostało 580 znaków

2013-10-05 11:14
0

Ładnie namieszałeś - komunikaty o błędach (kompilacji) dotyczą boosta 1.54 a Ty twierdzisz, że działasz na wersji: 1.42.01. Pokaż cały log kompilacji.

Pozostało 580 znaków

Liczba odpowiedzi na stronę

1 użytkowników online, w tym zalogowanych: 0, gości: 1, botów: 0