Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6046

Ununderstandable linking error mesage - C++ - linux [duplicate]

$
0
0

I was coding a state machine for a game in C++ (Ubuntu), but when I tried to compile with GCC, this error message appeared :

$ gcc main.cpp -o gameEngine/usr/bin/ld: /tmp/cc9n3ztz.o: in function `std::default_delete<pndl::State>::operator()(pndl::State*) const':main.cpp:(.text._ZNKSt14default_deleteIN4pndl5StateEEclEPS1_[_ZNKSt14default_deleteIN4pndl5StateEEclEPS1_]+0x20): undefined reference to `operator delete(void*, unsigned long)'/usr/bin/ld: /tmp/cc9n3ztz.o: in function `void std::deque<std::unique_ptr<pndl::State, std::default_delete<pndl::State> >, std::allocator<std::unique_ptr<pndl::State, std::default_delete<pndl::State> > > >::_M_push_back_aux<std::unique_ptr<pndl::State, std::default_delete<pndl::State> > >(std::unique_ptr<pndl::State, std::default_delete<pndl::State> >&&)':main.cpp:(.text._ZNSt5dequeISt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EESaIS5_EE16_M_push_back_auxIJS5_EEEvDpOT_[_ZNSt5dequeISt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EESaIS5_EE16_M_push_back_auxIJS5_EEEvDpOT_]+0x48): undefined reference to `std::__throw_length_error(char const*)'/usr/bin/ld: /tmp/cc9n3ztz.o: in function `std::__new_allocator<std::unique_ptr<pndl::State, std::default_delete<pndl::State> >*>::deallocate(std::unique_ptr<pndl::State, std::default_delete<pndl::State> >**, unsigned long)':main.cpp:(.text._ZNSt15__new_allocatorIPSt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE10deallocateEPS6_m[_ZNSt15__new_allocatorIPSt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE10deallocateEPS6_m]+0x24): undefined reference to `operator delete(void*, unsigned long)'/usr/bin/ld: /tmp/cc9n3ztz.o: in function `std::__new_allocator<std::unique_ptr<pndl::State, std::default_delete<pndl::State> >*>::allocate(unsigned long, void const*)':main.cpp:(.text._ZNSt15__new_allocatorIPSt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE8allocateEmPKv[_ZNSt15__new_allocatorIPSt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE8allocateEmPKv]+0x5c): undefined reference to `std::__throw_bad_array_new_length()'/usr/bin/ld: main.cpp:(.text._ZNSt15__new_allocatorIPSt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE8allocateEmPKv[_ZNSt15__new_allocatorIPSt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE8allocateEmPKv]+0x60): undefined reference to `std::__throw_bad_alloc()'/usr/bin/ld: main.cpp:(.text._ZNSt15__new_allocatorIPSt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE8allocateEmPKv[_ZNSt15__new_allocatorIPSt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE8allocateEmPKv]+0x6c): undefined reference to `operator new(unsigned long)'/usr/bin/ld: /tmp/cc9n3ztz.o: in function `std::__new_allocator<std::unique_ptr<pndl::State, std::default_delete<pndl::State> > >::deallocate(std::unique_ptr<pndl::State, std::default_delete<pndl::State> >*, unsigned long)':main.cpp:(.text._ZNSt15__new_allocatorISt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE10deallocateEPS5_m[_ZNSt15__new_allocatorISt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE10deallocateEPS5_m]+0x24): undefined reference to `operator delete(void*, unsigned long)'/usr/bin/ld: /tmp/cc9n3ztz.o: in function `std::__new_allocator<std::unique_ptr<pndl::State, std::default_delete<pndl::State> > >::allocate(unsigned long, void const*)':main.cpp:(.text._ZNSt15__new_allocatorISt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE8allocateEmPKv[_ZNSt15__new_allocatorISt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE8allocateEmPKv]+0x5c): undefined reference to `std::__throw_bad_array_new_length()'/usr/bin/ld: main.cpp:(.text._ZNSt15__new_allocatorISt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE8allocateEmPKv[_ZNSt15__new_allocatorISt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE8allocateEmPKv]+0x60): undefined reference to `std::__throw_bad_alloc()'/usr/bin/ld: main.cpp:(.text._ZNSt15__new_allocatorISt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE8allocateEmPKv[_ZNSt15__new_allocatorISt10unique_ptrIN4pndl5StateESt14default_deleteIS2_EEE8allocateEmPKv]+0x6c): undefined reference to `operator new(unsigned long)'/usr/bin/ld: /tmp/cc9n3ztz.o:(.data.rel.local.DW.ref.__gxx_personality_v0[DW.ref.__gxx_personality_v0]+0x0): undefined reference to `__gxx_personality_v0'collect2: error: ld returned 1 exit status

What have I gotten wrong?


Viewing all articles
Browse latest Browse all 6046

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>