Le Mercredi, 17 Juillet 2002 15.34, Pascal Perez - LHA a �crit :
> hello,
>
> je voulais tester GCC pour compiler un prog tout simple en C++ :
> vi ./helloworld.c
> #include <iostream>
>
> init main () {
Pas "init" mais "int", il y'a un "i" de trop.
> std::cout<<"Hello World!\n";
> }
>
> mais : gcc -o ./helloworld.c donne :
> ./helloworld.c:1:20: iostream: No such file or directory
>
> je n'ai rien trouv� sur google de sp�cial... j'ai aussi essay� avec
> iostream.h mais rien n'y fait.
>
> au cas ou : gcc -v
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
> gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
>
> Quelqu'un arait une id�e ?
>
> P
Utiliser:
c++ helloworld.c -o helloworld
ou
g++ helloworld.c -o helloworld
La syntaxe de base est:
c++ <fichier(s) source> -o <nom de l'ex�cutable g�n�r�>
--
http://www-internal.alphanet.ch/linux-leman/ avant de poser
une question. Ouais, pour se d�sabonner aussi.