I don't know if this is the right board for this but here goes

I have finsihed writing my program and it compiles fine on windows using the MinGW compiler. Ihave it compiling and running fine

I tried compiling on a linux machine to create an executable but i an getting loads of errors and none of them are helpful

Here is a list of the output.

Does anyone know what any of this means and how i can get rid of them?

> > > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0xd5): undefined reference to `std::basic_string<char, std::char_traits <char>, std::allocator<char> >::operator=(std::basic_string<char, std::char_trai ts<char>, std::allocator<char> > const&)'
Unmatched `.
blue94.ex.ac.uk% scanner.cpp:(.text._ZNSt6vectorISsSaISsEE13_M_insert_auxEN9__gnu_cxx17__normal_i teratorIPSsS1_EERKSs[std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits <char>, std::allocator<char> > > >::_M_insert_aux(__gnu_cxx::__normal_iterator<s td::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vec tor<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std: :allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0xe0): undefined reference to `std::basic_string<char, std::char_traits <char>, std::allocator<char> >::~basic_string()'
Unmatched `.
blue94.ex.ac.uk% scanner.cpp:(.text._ZNSt6vectorISsSaISsEE13_M_insert_auxEN9__gnu_cxx17__normal_i teratorIPSsS1_EERKSs[std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits <char>, std::allocator<char> > > >::_M_insert_aux(__gnu_cxx::__normal_iterator<s td::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vec tor<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std: :allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0xf6): undefined reference to `std::basic_string<char, std::char_traits <char>, std::allocator<char> >::~basic_string()'
Unmatched `.
blue94.ex.ac.uk% scanner.cpp:(.text._ZNSt6vectorISsSaISsEE13_M_insert_auxEN9__gnu_cxx17__normal_i teratorIPSsS1_EERKSs[std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits <char>, std::allocator<char> > > >::_M_insert_aux(__gnu_cxx::__normal_iterator<s td::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vec tor<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std: :allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x133): undefined reference to `std::__throw_length_error(char const*)'
Unmatched `.
blue94.ex.ac.uk% scanner.cpp:(.text._ZNSt6vectorISsSaISsEE13_M_insert_auxEN9__gnu_cxx17__normal_i teratorIPSsS1_EERKSs[std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits <char>, std::allocator<char> > > >::_M_insert_aux(__gnu_cxx::__normal_iterator<s td::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vec tor<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std: :allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x339): undefined reference to `__cxa_begin_catch'
Unmatched `.
blue94.ex.ac.uk% scanner.cpp:(.text._ZNSt6vectorISsSaISsEE13_M_insert_auxEN9__gnu_cxx17__normal_i teratorIPSsS1_EERKSs[std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits <char>, std::allocator<char> > > >::_M_insert_aux(__gnu_cxx::__normal_iterator<s td::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vec tor<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std: :allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x39f): undefined reference to `__cxa_rethrow'
Unmatched `.
blue94.ex.ac.uk% scanner.cpp:(.text._ZNSt6vectorISsSaISsEE13_M_insert_auxEN9__gnu_cxx17__normal_i teratorIPSsS1_EERKSs[std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits <char>, std::allocator<char> > > >::_M_insert_aux(__gnu_cxx::__normal_iterator<s td::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vec tor<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std: :allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x3c0): undefined reference to `__cxa_end_catch'

AdRock,

Post some code in code tags. I don't think anybody wants to look at what you posted. Preferably short. Can you get a Hello, Woirld to compile in Linux?

I got it working....don't know how

Your making reference to function you have not defined or you simply type in the wrong name for the header file you are typing to include that contains this functions prototype, simply your compiler cannot make reference to the function you called check your spelling on your includes

I think it was the way i was trying to compile it. Used to compiling on windows so used c++ file.cpp -o file.exe

should have taken the exe off in linux

I don't use linux that often but i know now

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.