[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [linux-team] Linkage C++ impossible
Moi, j'ai souvenir que le standard C++ interdit le casting de void* vers <n'importe quoi>*
A mon avis, to egcs vient d'etre upgrade et il supporte le standard un peu mieux. L'erreur est elle valide ?
fred.
Ludovic Kuty wrote:
>
> Bonjour,
>
> J'essaie de compiler et de linker un bete programme
> C++. A la compilation j'ai quelques warnings qui proviennent
> des fichiers include standards du C++ (?!?) et le linkage
> echoue lamentablement. Voici l'output:
> kuty@volvic (stuff - 600) > g++ shift.cc
> In file included from /usr/include/g++-2.7/iostream.h:31,
> from shift.cc:1:
> /usr/include/g++-2.7/streambuf.h:394: warning: invalid type `void *' for default argument to `ios *'
> In file included from shift.cc:1:
> /usr/include/g++-2.7/iostream.h:50: warning: invalid type `void *' for default argument to `ostream *'
> /usr/include/g++-2.7/iostream.h:121: warning: invalid type `void *' for default argument to `ostream *'
> /usr/include/g++-2.7/iostream.h:225: warning: invalid type `void *' for default argument to `ostream *'
> /usr/i486-linux/bin/ld: cannot open crtbegin.o: No such file or directory
>
> Pour ceux qui se poseraient trop de questions, le fichier shift.cc se compilait avant que
> je ne passe en SuSE 6.1, lorsque j'etais encore a la 5.3.
> Le fichier crtbegin.o se trouve avec ses petits camarades dans /usr/lib/gcc-lib/i486-linux/2.7.2.3/.
>
> Par contre, si je compile comme ceci, j'ai un fichier executable qui fonctionne:
> > gcc -xc++ shift.cc -lstdc++
> shift.cc:2: warning: namespaces are mostly broken in this version of g++
>
> Est-ce que qqn peut me donner des pistes ?
>
> Merci d'avance
>
> Ludovic Kuty
> ---------
> Visit the Linux Supertore Online: http://www.redcorp.com !
> If you want to be deleted from the list, send a mail to
> majordomo@rtfm.be with "unsubscribe linux-team" in the body.
--
------------------------- * oOo * -------------------------
CiscoSystems
Frederic Detienne, CSE II
Security & Network Services
Tel 32 2 705 55 55
---------
Visit the Linux Supertore Online: http://www.redcorp.com !
If you want to be deleted from the list, send a mail to
majordomo@rtfm.be with "unsubscribe linux-team" in the body.