Mail Archives: djgpp/1995/03/24/11:27:44
>c:\>gcc -v string4.cpp -o string
You keep C++ programs in the root directory?!
Aside from that, however, this line reveals one (or maybe two) mistakes you
made: You forgot to have gcc link in the iostream stuff (which you can do
by specifying -lgpp or -liostream); this would account for many of your
undefined symbols. You also probably need to give GCC the -O or -O2 flag
so it can perform optimization (including inlining (!)).
>I've tried using all kinds of command-line directives to make sure the proper
>library and include files are found; I even matched the individual headers in
>the djgpp\cplusinc directory to make sure there were no naming differences (I
>only found 1 so far - "_string.h", but no "string.h") and adjusted the #include
that's because DOS uses a case-insensitive filesystem, so otherwise there
would be no way to tell string.h from String.h. If all you need is the ANSI
C standard library string functions, however, just include string.h (which is
included by _string.h).
--- Aaron Ucko (ucko AT vax1 DOT rockhurst DOT edu; finger for PGP public key) | httyp!
Geek code 2.1 [for explanation, finger hayden@ | `God's Laws' (Rudy Rucker,
vax1.mankato.msus.edu]: GCS/M/S d(-) H s g+ p? \ _Master of Space and Time_):
!au a17 w+ v+(++) C++(+++)>++++ UL++(S+)>++++ \ 1) Be clean. 2) Follow Gary.
P+(++) L++ 3(-) E- N+(++) K- W--(---) M-@ V-(--) \ 3) Teach God's Laws.
po-(--) Y+ t(+) !5 j(++) R(-) G' tv--(-) b+++ +---------------------------
!D(--) B--(---) e>++++(*) u++(@) h!() f(+) r-(--)>+++ n+(-) y?
- Raw text -