Mail Archives: djgpp/1997/09/08/04:51:16
On Sat, 6 Sep 1997, Bill wrote:
> I write software using the C stdio.h include. I use the services of C++ in
> the fact that I use the classes and inheritance properties of the class
> structure. I do not use the operator overloading and such found from
> including the iostream header file in my projects. Does this mean that I am
> using the C++ library or not?
If you don't use any of the classes that the C++ library provides, then
your program does NOT link in any modules from the C++ library. To make
sure you don't link in something from the libgpp.a library (which alone
is under the GNU license), link your program like this:
gcc -o myprog file1.o file2.o ... -lstdcxx -liostream
(here file1.o etc. are your object files and myprog is the name of the
program you are producing). This tells gcc to only search the libraries
which are totally free. If gcc doesn't complain about unresolved
externals, you are safe.
- Raw text -