mardi 23 juin 2020

how to configure -std=c++11 as default compiler?

Hi i am working on C++11 related feature , i need to include header file such as

 #include <zmqpp/zmqpp.hpp>

in my source code and i wrote some simple g++ script to compile it such as

g++ client.c  -o client

i just realized i need to run it with additional argument

g++ -std=gnu++11  client.c .......

in order for me compile successfully.

I am curious what is the default compiler for g++? is it possible for me set -std=gnu++11 as my default c++ compiler?

Let me know if this duplicated, i was googling around but i don't see any information related to my scenario. Thanks

Aucun commentaire:

Enregistrer un commentaire