I am trying to compile and skip a very simple C ++ program with the g ++ compiler (4.6.0 on Mac OSX). But when compiling, I get a warning.
source:
#include </usr/local/Cellar/gcc/4.6.0/gcc/include/c++/4.6.0/iostream>
int main(){
std::cout << ("Hello World\n") ;
}
Terminal Code:
g++ hello.cc -Wall -std=c++0x -s
g++ hello.cc -Wall -std=c++0x -o test -Wl,-s
Compiler Warning:
ld: warning: option -s is obsolete and being ignored
Does anyone know about this strange warning?
Edit:
It is strange that the size decreases when using the -s flag, decreases from 9.216 to 9.008.
However, when I use the following, the size decreases to 8,896 bytes.
cp hello hello_stripped
strip hello_stripped
Tieme source
share