Mail Archives: djgpp/1994/09/27/23:27:44
> I'm having some trouble during linking when I try to use things from iomanip.h.
> I have this little test file:
>
> #include <iostream.h>
> #include <iomanip.h>
>
> int main()
> {
> cout << '|' << setw(5) << 245 << '|' << endl;
> return 0;
> }
>
> When I compile with gcc -Wall -o test test.cc -lgpp, I get the output
>
> test.cc(.text+0x42): undefined reference to `operator<<(ostream &,
> smanip<int> const &)'
>
> Am I missing some library, or is something else going on?
Something else is going on....there is a problem in iomanip.h. The declaration
of class omanip (or is it oapp? I forget) is incorrect; change it to look like
the declaration of imanip (or iapp). I presume dj will fix this bug in the
next maintenance release, but for now you'll have to change it yourself. I
no longer have the original to make a patch file, but I can post the changed
block if necessary.
> One other little point. Compiling a file using the _string.h header file in
> cplusinc/ with -Wall gives zillions of warnings. I've fixed it by just putting
> `inline' in front of all the function declarations from line 400--446, but it
> seems a bit strange...?
I noticed this too, but I didn't investigate it that thoroughly. Oh well.
- Raw text -