Mail Archives: djgpp/1997/11/03/02:47:36
Jos van Riswick (josvanr AT mbfys DOT kun DOT nl) writes:
> Hello,
>
> I'm learning c++, and I'm using djgpp and bcc. The first
> program I wrote, called test.cc reads:
>
> #include <iostream.h>
>
> void main() {
>
> cout << "Hallo";
>
> }
>
> It compiles fine with bcc. However, gcc, no. It doesn't
> compile.
Evidently, BCC includes the stream library when linking, automatically.
GCC does not.
gcc test.cc -o test.exe -liostr
works.
There's a shortcut:
gxx test.cc -o test.exe will automagically link iostreams if you use them
in test.cc.
--
.*. Where feelings are concerned, answers are rarely simple [GeneDeWeese]
-() < When I go to the theater, I always go straight to the "bag and mix"
`*' bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh
- Raw text -