I need help on , I have been doing this on the same computer, it means I already installed boost library, and based on the previous code, but this time it gives me errors: /tmp/ccpAYzPw.o: In function `main':
reading_data.cpp:(.text+0x356): undefined reference to `boost::program_options::options_description::m_default_line_length'
reading_data.cpp:(.text+0x361): undefined reference to `boost::program_options::options_description::m_default_line_length'
reading_data.cpp:(.text+0x3a6): undefined reference to `boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
reading_data.cpp:(.text+0x3d3): undefined reference to `boost::program_options::options_description::add_options()'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'reading_data' failed
I spent almost 2 hour to see what is going on? but I could not understand why, so I need your helps.
Here is my code and thank you very much.
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <fstream>      // std::ifstream
#include <boost/program_options.hpp>
int main ()
{
    boost::program_options::options_description desc("Allowed options");
    desc.add_options()
            ("sign"  , program_options::value<string>()  -> default_value("gbm")    ,"name of the input")
            ("week"  , program_options::value<double>()  -> default_value(1930)     ,"number of the week")
            ("day"   , program_options::value<double>()  -> default_value(0)        ,"number of the day in within the week")
            ("hour"  , program_options::value<double>()  -> default_value(0)        ,"time in hour")
            ("minute", program_options::value<double>()  -> default_value(0)        ,"time in minute")
            ("second", program_options::value<double>()  -> default_value(0)        ,"time in second")
            ;
    cout << "Done!" << endl;
    return 0;
}
 
     
     
     
    