cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
igal_kroyter
Participant
Participant
2,867 Views
Registered: ‎09-13-2016

C++ on Petalinux questions

Hello,

 

I'm trying to port c++ application from visual studio to petalinux during which the following questions have raised:

1) Do the following includes supported:

#include <mutex>
#include <thread>

Because I got the following error: "This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options?

 

2) Where do I set the flag -std=c++11? I have tried in the makefile that petalinux tools provide:

CPPFLAGS += -std=c++11  (failure).

 

0 Kudos
Reply
3 Replies
greatgehar
Observer
Observer
2,809 Views
Registered: ‎07-24-2012

2). Open project properties, navigate to the project settings: C/C++ Build > Settings > Miscellaneous. Add to "Other flags" you any flags.

0 Kudos
Reply
igal_kroyter
Participant
Participant
2,793 Views
Registered: ‎09-13-2016

greatgehar, thank you for the reply.

 

I am compiling with the petalinux command-line tools (petalinux-build -c myapp) not with the XSDK.

 

Are you familiar with the syntax that is to be used with the petalinux provide makefile?

 

Thanks,

 

Igal

 

 

0 Kudos
Reply
rgrossman
Adventurer
Adventurer
2,771 Views
Registered: ‎12-03-2015

I have seen the same errors and found that they didn't make a difference. The compiler defaults to c++11.

I have also added this to the Makefile for myapp:

CFLAGS := $(CFLAGS) -std=c++11
0 Kudos
Reply