Re: g++
On Thu, Dec 19, 2002 at 10:33:39PM +0100, Michael Langer wrote:
> Hi, Adrian.
> > hast du ein #include <test1.h> in test2.c?
> Ja habe ich, ich wollte testen ob ich so das makefile
> umgehen kann (bzw keines machen muß, weil ich denke
> dass man das für sowas braucht)
> > Falls ja schick bitte den kompletten Code.
>
> test1.cpp
> using namespace std;
>
> #include <test1.h>
Das sollte
#include "test1.h"
heissen.
>...
> Ich hoffe mal das das jezt kein total einfacher
> und für mich peinlicher Fehler ist ;)
>...
Dein "implicid declaration of function.." bekomme ich nicht, bei mir
sind Fehlermeldung und Loesung recht logisch:
<-- snip -->
$ g++ test2.cpp -o test
/tmp/cc77XvYg.o(.text+0x7): In function `main':
: undefined reference to `out(void)'
collect2: ld returned 1 exit status
$ g++ test2.cpp test1.cpp -o test
$ ./test
bla bla
$
<-- snip -->
> Michael
Gruss
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
Reply to:
- References:
- g++
- From: "Michael Langer" <mphantom@gmx.net>
- Re: g++
- From: Adrian Bunk <bunk@fs.tum.de>
- Re: g++
- From: "Michael Langer" <mphantom@gmx.net>