Mail Archives: djgpp/1998/10/18/15:44:31
Eric Weiss wrote:
>
> Thanks for the suggestion. That was all I needed to do. The quick
> start/readme documentation does not mention this is how you get C++,
Did you miss this bit in README.1ST?
# To link a C++ program, use gxx instead of gcc, like this:
#
# gxx -o myprog.exe mymain.o mysub1.o mysub2.o
> although there is mention that gcc will automatically use C++ on .cpp
> files.
It will, when compiling. But when linking (creating the executable),
often all GCC sees is .o files, for which C and C++ are
indistinguishable. Thus, it needs to be told to scan the C++ libraries,
which is why you use `gxx'.
> I guess I've done it with Unix too long.
Most Unix systems I've seen also require you to use `c++' or some
variant instead of `cc' when linking C++, for the same reason as above.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -