Is there a way to apply -std=*** in g++ to only one file -


i in process of wrapping large c library c++ , converting of outside layers c++.

following principle of breaking 1 thing @ time in conversion, not writing makefiles till later.

i want following:

g++ a.c b.c d.c e.c --std=c++11 test.cpp 

and even

g++ a.c b.c d.c  --std=c++11 e.cpp test.cpp 

a bit later.

is there way of specifying -std=c++11 apply c++ files?

one way accomplish break compiling process in 2 different stages:

1) compile object files separately std specifier:

g++ -s a.c b.c d.c g++ -s a.cpp b.cpp d.cpp -std=c++11 

2) compile final executable using object files generated:

g++ -o myelf a.s b.s d.s 

Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -