Try this, it worked for me g++ -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 -std=c++11 test.cpp -pthread
I dont know where I found this, it was through google searches though. Carl On Saturday, December 28, 2013 9:07:58 PM UTC-6, [email protected] wrote: > > Hello everyone, > > *Note: I posted previously asking my question but I realized I had to fill > out the "Categories" after I clicked "POST" and I couldn't find my original > post anywhere so I apologize if this gets posted twice. > > I have been having issues with C++ and threads on Angstrom. I currently > have the latest Angstrom release for Beaglebone and kernel 3.2.42. > > So, I have tried compiling (this example here > http://www.cplusplus.com/reference/thread/thread/) with the various > combination of -pthread, -lpthread, -std=c++0x, -std=c++11, and I always > get this error: "pure virtual method called; terminate called without an > active exception;Aborted", when running the executable. > > I looked around and it seems g++ v4.7+ solves this problem so I decided to > cross compile for ARM using my Ubuntu Desktop. So, after setting up all the > necessary options with ARM cross compilation (using cross compile g++ > v4.7.2) on Eclipse, the same issue occurred. > > Has anyone gotten threads with C++ to work on Angstrom? If so, or if you > have a solution to my problem, could you please direct me to the right > direction? > > > Thank you so much. > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
