-static-libgcc
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question#include #include <cstdlib> using namespace std; int main() { try { cout << "Hello"; throw 0; } catch(...) { cout << " world !" << endl; } system("pause"); }
"32\bin\g++.exe" "hello world.cpp" -mthreads -static-libgcc -ohelloworld32.exe
"64\bin\g++.exe" "hello world.cpp" -mthreads -static-libgcc -ohelloworld64.exe
> g++ hello.cc -static
> ls
1,2M a.out*
> g++ hello.cc
> ls
9,1K a.out*
> g++ hello.cc -static -pthread
> ls
1,3M a.out*
> g++ hello.cc -pthread
> ls
9,1K a.out*
> g++ hello.cc -m64
> ls
15K a.out*
> g++ hello.cc -m64 -pthread
> ls
15K a.out*
> g++ hello.cc -m64 -static
> ls
1,4M a.out*
> g++ hello.cc -m64 -pthread -static
> ls
1,4M a.out*
g++ --version
g++ (Ubuntu 4.4.1-4ubuntu9) 4.4.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.