O nome do executável padrão é a.out
, de acordo com o g++
manpage:
-o file
Place output in file file. This applies to whatever sort
of output is being produced, whether it be an executable file,
an object file, an assembler file or preprocessed C code.
If -o is not specified, the default is to put an executable file
in a.out, the object file for source.suffix in source.o, its
assembler file in source.s, a precompiled header file in
source.suffix.gch, and all preprocessed C source on standard output.
Portanto, você pode usar ./a.out
para executar o executável compilado ou adicionar o argumento -o
à linha de comando g++
:
$ g++ -o server server.cpp -Wall
$ ./server