jeudi 8 janvier 2015

import library on ardupilot project

I have some problems with cpp.react library (C++11). I'm trying to use it on ardupilot project (C++). I followed the instructions to compile the library and then I added -std=c++11 on:



CXXOPTS = -ffunction-sections -fdata-sections -fno-exceptions -fsigned-char -std=c++11 -fexceptions


When I simply include the library everything go fine, when I try to use it the compilation give me this error:



/home/endri/ardupilot/ArduCopter/../libraries/cpp.react/include/react/detail/graph/../IReactiveEngine.h:120: undefined reference to `react::impl::toposort::EngineBase<react::impl::toposort::SeqNode, react::impl::toposort::SeqTurn>::OnNodeDetach(react::impl::toposort::SeqNode&, react::impl::toposort::SeqNode&)'
collect2: error: ld returned 1 exit status


I don't understand the "collect2: error: ld returned 1 exit status" error. I read other threads about this problem but i didn't resolve it. Is it because i cannot use c++11 libraries on c++ project? Or if I can do that, where I'm wrong?


Aucun commentaire:

Enregistrer un commentaire