compiler error

hi,

these are my errors and i really don't know what to do to fix them. i'm guessing its some inclusion errors but i'm really just kind of lost. i have 4 .cpp files, 3.h files and i don't know which part to show here. any and all help is appreciated. =\

/cs/student/jcastaneda/Desktop/Programs/cs130a/proj/proj.cpp:22: undefined reference to `Trie::Trie()'
/cs/student/jcastaneda/Desktop/Programs/cs130a/proj/proj.cpp:34: undefined reference to `SLSLRep::SLSLRep(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/cs/student/jcastaneda/Desktop/Programs/cs130a/proj/proj.cpp:36: undefined reference to `Trie::Insert(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Item*)'
/cs/student/jcastaneda/Desktop/Programs/cs130a/proj/proj.cpp:54: undefined reference to `Trie::Getptr2Item(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/cs/student/jcastaneda/Desktop/Programs/cs130a/proj/proj.cpp:56: undefined reference to `Element::Element(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/cs/student/jcastaneda/Desktop/Programs/cs130a/proj/proj.cpp:58: undefined reference to `Trie::Insert(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Item*)'
/cs/student/jcastaneda/Desktop/Programs/cs130a/proj/proj.cpp:125: undefined reference to `Trie::MemberElement(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/cs/student/jcastaneda/Desktop/Programs/cs130a/proj/proj.cpp:127: undefined reference to `Trie::MemberSet(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
collect2: ld returned 1 exit status
make: *** [proj] Error 1
Those are linker errors.

Looks like you're not linking all your files into the final executable, and the linker is complaining because it sees calls to functions without bodies.
Last edited on
Please post your code for "proj.cpp" and I will try to help.
Topic archived. No new replies allowed.