J'ai installé Arch assez récement donc pour vérifier que tout fonctionne bien j'ai fait un fichier bidon nommé test.cpp :
Code : Tout sélectionner
#include <iostream>
using namespace std;
int main()
{
cout<< "Archlinux c'est bon pour la santé !!";
}
Code : Tout sélectionner
[squall@handfgd projet]$ gcc -Wall -Wextra test.cpp -o test
/tmp/ccYVxjzN.o: In function `__static_initialization_and_destruction_0(int, int)':
test.cpp:(.text+0x2e): undefined reference to `std::ios_base::Init::Init()'
test.cpp:(.text+0x33): undefined reference to `std::ios_base::Init::~Init()'
collect2: ld a retourné 1 code d'état d'exécution
[squall@handfgd projet]$ vim test.cpp
[squall@handfgd projet]$ gcc -Wall -Wextra test.cpp -o test
/tmp/cc7rjMdE.o: In function `main':
test.cpp:(.text+0xa): undefined reference to `std::cout'
test.cpp:(.text+0xf): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/cc7rjMdE.o: In function `__static_initialization_and_destruction_0(int, int)':
test.cpp:(.text+0x3d): undefined reference to `std::ios_base::Init::Init()'
test.cpp:(.text+0x42): undefined reference to `std::ios_base::Init::~Init()'
collect2: ld a retourné 1 code d'état d'exécution
Code : Tout sélectionner
using namespace std;
int main()
{
cout<< "Archlinux c'est bon pour la santé !!";
}
Auriez vous, s'il vous plaît, une solution à me proposer sachant que c'est très important et urgent pour moi ?
Par avance merci.