Code:
gcc mergeSort.cpp -o mergeSort
mergeSort.cpp: In function `int main()':
mergeSort.cpp:22: error: no matching function for call to `mergeSort(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >&, bool (&)(int&, int&))'
student@eecs280-student-vm:~/workspace/Project4$ gcc mergeSort.cpp -o mergeSort
mergeSort.cpp: In function `int main()':
mergeSort.cpp:21: error: no matching function for call to `mergeSort(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >&, bool (&)(int&, int&))'
student@eecs280-student-vm:~/workspace/Project4$ gcc mergeSort.cpp -o mergeSort
mergeSort.cpp: In function `int main()':
mergeSort.cpp:21: error: no matching function for call to `mergeSort(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >&, bool (*)(int&, int&))'
student@eecs280-student-vm:~/workspace/Project4$ gcc mergeSort.cpp -o mergeSort
/tmp/ccokdOWu.o: In function `std::__verify_grouping(char const*, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
mergeSort.cpp:(.text+0xd): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const'
mergeSort.cpp:(.text+0x60): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
mergeSort.cpp:(.text+0x9e): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
mergeSort.cpp:(.text+0xcc): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
/tmp/ccokdOWu.o: In function `__static_initialization_and_destruction_0(int, int)':
mergeSort.cpp:(.text+0x261): undefined reference to `std::ios_base::Init::Init()'
/tmp/ccokdOWu.o: In function `__tcf_0':
mergeSort.cpp:(.text+0x292): undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccokdOWu.o: In function `void merge<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, bool (*)(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::value_type&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::value_type&))':
mergeSort.cpp:(.gnu.linkonce.t._Z5mergeIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_S7_PFbRNS7_10value_typeES9_E+0x3c): undefined reference to `operator new[](unsigned int)'
mergeSort.cpp:(.gnu.linkonce.t._Z5mergeIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_S7_PFbRNS7_10value_typeES9_E+0x4d): undefined reference to `operator new[](unsigned int)'
/tmp/ccokdOWu.o: In function `std::vector<int, std::allocator<int> >::_M_insert_aux(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int const&)':
mergeSort.cpp:(.gnu.linkonce.t._ZNSt6vectorIiSaIiEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPiS1_EERKi+0x1cb): undefined reference to `__cxa_begin_catch'
mergeSort.cpp:(.gnu.linkonce.t._ZNSt6vectorIiSaIiEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPiS1_EERKi+0x207): undefined reference to `__cxa_rethrow'
mergeSort.cpp:(.gnu.linkonce.t._ZNSt6vectorIiSaIiEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPiS1_EERKi+0x212): undefined reference to `__cxa_end_catch'
/tmp/ccokdOWu.o: In function `__gnu_cxx::new_allocator<int>::deallocate(int*, unsigned int)':
mergeSort.cpp:(.gnu.linkonce.t._ZN9__gnu_cxx13new_allocatorIiE10deallocateEPij+0xd): undefined reference to `operator delete(void*)'
/tmp/ccokdOWu.o: In function `__gnu_cxx::new_allocator<int>::allocate(unsigned int, void const*)':
mergeSort.cpp:(.gnu.linkonce.t._ZN9__gnu_cxx13new_allocatorIiE8allocateEjPKv+0x10): undefined reference to `operator new(unsigned int)'
/tmp/ccokdOWu.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
student@eecs280-student-vm:~/workspace/Project4$ gcc mergeSort.cpp mergeSortContainer.cpp -o mergeSort
mergeSort.cpp: In function `int main()':
mergeSortContainer.h:12: error: `mergeSortContainer<I>::mergeSortContainer() [with I = __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >]' is private
mergeSort.cpp:21: error: within this context
mergeSortContainer.h:13: error: `mergeSortContainer<I>::~mergeSortContainer() [with I = __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >]' is private
mergeSort.cpp:21: error: within this context
mergeSortContainer.cpp:61: error: `void mergeSortContainer<I>::mergeSort(I, I, bool (*)(typename I::value_type&, typename I::value_type&)) [with I = __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >]' is private
mergeSort.cpp:22: error: within this context
mergeSortContainer.cpp:8: error: expected initializer before '<' token
mergeSortContainer.cpp:61: error: expected initializer before '<' token
student@eecs280-student-vm:~/workspace/Project4$ gcc mergeSort.cpp -o mergeSort
mergeSort.cpp: In function `int main()':
mergeSortContainer.h:12: error: `mergeSortContainer<I>::mergeSortContainer() [with I = __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >]' is private
mergeSort.cpp:21: error: within this context
mergeSortContainer.h:13: error: `mergeSortContainer<I>::~mergeSortContainer() [with I = __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >]' is private
mergeSort.cpp:21: error: within this context
mergeSortContainer.cpp:61: error: `void mergeSortContainer<I>::mergeSort(I, I, bool (*)(typename I::value_type&, typename I::value_type&)) [with I = __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >]' is private
mergeSort.cpp:22: error: within this context
student@eecs280-student-vm:~/workspace/Project4$ gcc mergeSort.cpp -o mergeSort
/tmp/ccoXie7L.o: In function `std::__verify_grouping(char const*, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
mergeSort.cpp:(.text+0xd): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const'
mergeSort.cpp:(.text+0x60): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
mergeSort.cpp:(.text+0x9e): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
mergeSort.cpp:(.text+0xcc): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
/tmp/ccoXie7L.o: In function `main':
mergeSort.cpp:(.text+0x1f6): undefined reference to `mergeSortContainer<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >::mergeSortContainer()'
mergeSort.cpp:(.text+0x222): undefined reference to `mergeSortContainer<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >::~mergeSortContainer()'
mergeSort.cpp:(.text+0x247): undefined reference to `mergeSortContainer<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >::~mergeSortContainer()'
/tmp/ccoXie7L.o: In function `__static_initialization_and_destruction_0(int, int)':
mergeSort.cpp:(.text+0x295): undefined reference to `std::ios_base::Init::Init()'
/tmp/ccoXie7L.o: In function `__tcf_0':
mergeSort.cpp:(.text+0x2c6): undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccoXie7L.o: In function `std::vector<int, std::allocator<int> >::_M_insert_aux(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int const&)':
mergeSort.cpp:(.gnu.linkonce.t._ZNSt6vectorIiSaIiEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPiS1_EERKi+0x1cb): undefined reference to `__cxa_begin_catch'
mergeSort.cpp:(.gnu.linkonce.t._ZNSt6vectorIiSaIiEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPiS1_EERKi+0x207): undefined reference to `__cxa_rethrow'
mergeSort.cpp:(.gnu.linkonce.t._ZNSt6vectorIiSaIiEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPiS1_EERKi+0x212): undefined reference to `__cxa_end_catch'
/tmp/ccoXie7L.o: In function `mergeSortContainer<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >::merge(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, bool (*)(int&, int&))':
mergeSort.cpp:(.gnu.linkonce.t._ZN18mergeSortContainerIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEE5mergeES6_S6_S6_PFbRiS8_E+0x3c): undefined reference to `operator new[](unsigned int)'
mergeSort.cpp:(.gnu.linkonce.t._ZN18mergeSortContainerIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEE5mergeES6_S6_S6_PFbRiS8_E+0x4d): undefined reference to `operator new[](unsigned int)'
/tmp/ccoXie7L.o: In function `__gnu_cxx::new_allocator<int>::deallocate(int*, unsigned int)':
mergeSort.cpp:(.gnu.linkonce.t._ZN9__gnu_cxx13new_allocatorIiE10deallocateEPij+0xd): undefined reference to `operator delete(void*)'
/tmp/ccoXie7L.o: In function `__gnu_cxx::new_allocator<int>::allocate(unsigned int, void const*)':
mergeSort.cpp:(.gnu.linkonce.t._ZN9__gnu_cxx13new_allocatorIiE8allocateEjPKv+0x10): undefined reference to `operator new(unsigned int)'
/tmp/ccoXie7L.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status