Hello there !
I’m currently trying to implement an algorithm who use list containers but I got some compilation errors. Several things are very strange :
This code works : (I mean, I can compile it)
#include<vector>
std::vector<int> myVector ;
myVector.push_back(0) ;
This code works :
#include<list>
std::list<int> myList ;
This code doesn’t work when I use the make px4fmu-v3_default
command but works when I use the make posix_sitl_default
:
#include<list>
std::list<int> myList ;
myList.push_back(0) ;
I got this error :
[100%] Linking CXX executable firmware_nuttx
…/…/modules/commander/libmodules__commander.a(commander.cpp.obj): In function _M_insert<int>': /usr/include/newlib/c++/4.9.3/bits/stl_list.h:1689: undefined reference to
std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)’
collect2: error: ld returned 1 exit status
Does someone fixed this problem yet ?