AnsweredAssumed Answered

std::vector in S32 & EWL

Question asked by Fabrizio Santini on Jan 17, 2019
Latest reply on Jan 21, 2019 by Fabrizio Santini

I have a strange problem. As soon as I start using a std::vector, I get a link error.

 

The following code is a simple S32 C++/EWL project:

#include <vector>

int main()
{
     counterclass myccounter;

    xcptn_xmpl ();              /* Configure and Enable Interrupts */

    std::vector<int> a;
    a.push_back(10);

    /* Loop forever */
     for(;;) {    
               myccounter.increment();
          }
}

It is the main generated by the S32 wizard (I am not even setting the C++ dialect). If I try to compile this code I get the following error:

 

Building target: cpp_stl_Z7_0.elf
Executing target #8 cpp_stl_Z7_0.elf
Invoking: Standard S32DS C++ Linker
powerpc-eabivle-g++ -o "cpp_stl_Z7_0.elf" "@cpp_stl_Z7_0.args"    
./src/main.o: In function `std::tr1::detail::shared_ptr_deleter<char, std::detail::default_delete<char []>, std::allocator<void> >::get_deleter(std::type_info const&) const':
/home/fab/Applications/NXP/S32DS_Power_v2017.R1/S32DS/e200_ewl2/EWL_C++/include/ewl_smart_pointers:1322: undefined reference to `std::type_info::operator==(std::type_info const&) const'
makefile:70: recipe for target 'cpp_stl_Z7_0.elf' failed
collect2: error: ld returned 1 exit status
make: *** [cpp_stl_Z7_0.elf] Error 1

 

Am I forgetting a library setting somewhere?

 

thanks!

Outcomes