Menu

c++11

torkio
2014-10-22
2014-10-22
  • torkio

    torkio - 2014-10-22

    Hello
    Thank you for the useful tool
    I was tryng to use laba c++11 and got the error message that I have to configure g++ with the parameter -std=c++11
    Where should I put this parametr? I tryed ./igcc -std=c++11 but not working

    should I change the run.py file ?

    compiler_command = ( "g++", "-x", "c++", "-o", "$outfile", "-",
    "$include_dirs", "$lib_dirs", "$libs" )
    to
    compiler_command = ( "g++", "-x", "std=c++11", "-o", "$outfile", "-",
    "$include_dirs", "$lib_dirs", "$libs" )

    Cheers
    Paolo

     
  • Andy Balaam

    Andy Balaam - 2014-10-22

    Hi Paolo, yes, that looks like the right thing to do. Perhaps igcc should pass on all flags it doesn't understand to gcc.

     
  • torkio

    torkio - 2014-10-22

    Hi Andy

    I changed the run.py in this way
    compiler_command = ( "g++", "-x", "c++","-std=c++11", "-o", "$outfile", "-",
    "$include_dirs", "$lib_dirs", "$libs" )

    and now I am able to run c++11 features

    :D

     
  • Andy Balaam

    Andy Balaam - 2014-10-22

    Excellent!

     

Log in to post a comment.