Not works compilation c++ 4.7.2 in Debian testing x64

285 Views Asked by At

I'm trying to do a manual compilation with g++ in debian testing x64bits,

The content of my file test.cpp is:

#include <iostream>

using namespace std;

int main() {

  cout << "Hola Mundo" << endl;

  return 0;

}

but when I run the command, for example to compile a simple hello word

g++ test.cpp -o test

When I run the command ls:

test.cpp

g++ generates nothing. Is rare.

Basically happens with any program I try to compile with c++.

Datas about my Debian:

kernel: 3.9-1-amd64

Datas about g++( run the command g++ -v):

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-        bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5) 

How to fix my trouble?

Thank you.

1

There are 1 best solutions below

0
On

Have you tried to add the compiler-commands for more detailed info?

-Wall -g

Maybe it works if you hit that ?

g++ -o test test.cpp