Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

TextDocsComprLETTERS_SET, referenced from: _ZN12TextDocsCmprLETTER

  1. Nov 29, 2013 #1
    “TextDocsCompr::LETTERS_SET”, referenced from: _ZN12TextDocsCmprLETTER

    This is my header file:
    Code (Text):

    #include <vector>  // std::vector
    #include <string> // std::string
    #include <fstream> // std::ifstream
    #include <set> // std::set

    class TextDocsCmpr {


        void addFile(std::string);
        void setThreshold(double);


        std::vector<std::string> files_vec;
        std::vector<std::string> get_file_sntncs(std::fstream&);
        std::vector<std::string> get_sntnc_wrds(const std::string&);
        double sntnc_smlrty_qtnt(std::vector<std::string>, std::vector<std::string>);
        static std::set<char> LETTERS_SET;
        double sntnc_smlrty_thrshld;

    I initialize LETTERS_SET under the constructor in my cpp file:

    Code (Text):

    TextDocsCmpr::TextDocsCmpr() {
        // Set the sentence similarity threshold to a default of 0.7
        sntnc_smlrty_thrshld = 0.7;
        // Add all the characters of LETTERS_ARR to LETTERS_SET
        const char LETTERS_ARR[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
                                               'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D',
                                               'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
                                               'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\'', '.'};
        for (int i = 0; i < sizeof(LETTERS_ARR)/sizeof(char); ++i)
    But for some reason I get the following error:

    "TextDocsCmpr::LETTERS_SET", referenced from: __ZN12TextDocsCmpr11LETTERS_SETE$non_lazy_ptr in PlagiarismDetector.o symbol(s) not found collect2: ld returned 1 exit status

    I'm sorry for asking so many questions. Any help is greatly appreciated. You guys are the best!
  2. jcsd
  3. Nov 29, 2013 #2


    Staff: Mentor

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook