Я думаю, что я установил подталкивание правильно, так что я пытаюсь использовать тест «first.cpp» найдено here:Действительно базовая о C++/Boost - тестирование подталкивание
#include<iostream>
#include<boost/any.hpp>
int main()
{
boost::any a(5);
a = 7.67;
std::cout<<boost::any_cast<double>(a)<<std::endl;
}
И я получаю следующее:
[email protected] /home/jason
$ g++ -o first first.cpp
first.cpp:2:24: boost/any.hpp: No such file or directory
first.cpp: In function `int main()':
first.cpp:6: error: `boost' has not been declared
first.cpp:6: error: `any' undeclared (first use this function)
first.cpp:6: error: (Each undeclared identifier is reported only once for each
unction it appears in.)
first.cpp:6: error: expected `;' before "a"
first.cpp:7: error: `a' undeclared (first use this function)
first.cpp:8: error: `boost' has not been declared
first.cpp:8: error: `any_cast' undeclared (first use this function)
first.cpp:8: error: expected primary-expression before "double"
first.cpp:8: error: expected `;' before "double"
first.cpp:9:2: warning: no newline at end of file
[email protected] /home/jason
$
Где моя подталкивание библиотека находится в моем ./home/Jason/
Очевидно что-то вверх. Кроме того, все подталкивание библиотеки сами использовать этот "импульс/..." так почему-то либо:
1 - я сделал что-то не так с Boost, 2 - C++/НКУ не "видящего" мой импульс
любой вход?
Что такое «стандартный путь»? Я бы предпочел просто его там. –
Да, вы можете оставить его там, но тогда вам нужно сказать GCC, где его искать. – Thibaut
Как узнать, правильно ли он установлен? есть ли что-нибудь, что я могу сделать за пределами вышеперечисленного? как я могу сказать gcc, где искать –