I am trying to write a c++ extension for Ruby. In addition to the main file, I have a file extconf.rb:
require "mkmf"
$libs += " -lstdc++ "
create_makefile("file_name")
and, after doing ruby extconf.rb, when I try to compile it with g++ by typing make, I get the warning:
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
I read that it is not harmful, but is there a way to avoid this warning? There is a person with the same problem here, but the solution cannot be found.
Edit the resulting
Makefilecreated after runningcreate_makefileand remove the-Wdeclaration-after-statementfrom there.