Mail Archives: djgpp/1994/08/11/15:54:24
On Thu, 11 Aug 1994, Paul Harness wrote:
> of 1.12, this didn't occur. Anyway, I found that it could be solved by
> putting:
>
> #pragma implementation "_string.h"
>
> in my program, or by commenting out `#pragma interface' in _string.h. We
> shouldn't have to do this, should we?
Hmmmm, I tried this and now I have the opposite problem. Instead of
undefined references to String methods, I get multiple definitions of
_IO_stdout_ , _IO_stderr_, and _IO_listall_ ...
Same program I posted earlier, same compilation line. Doing either of
the things you suggest produces the same behavior. Paul: can you try my
test program and see whether it works for you?
#pragma implementation "_string.h"
#include <_string.h>
main()
{
String s("Hello?");
}
gcc strtst.cc -o strtst -lgpp -v
This gives:
stdstrbufs.cc(.data+0x0): multiple definition of `_IO_stdin_'
stdfiles.c(.data+0x0): first defined here
stdstrbufs.cc(.data+0x50): multiple definition of `_IO_stdout_'
stdfiles.c(.data+0x50): first defined here
stdstrbufs.cc(.data+0xa0): multiple definition of `_IO_stderr_'
stdfiles.c(.data+0xa0): first defined here
stdstrbufs.cc(.data+0x1ec): multiple definition of `_IO_list_all'
stdfiles.c(.data+0xf0): first defined here
If the "test release" of libg++ 2.6.0 doesn't have this problem,
perhaps we should go back to it?? (Is that at ftp.cygnus.com ?)
Gordon
- Raw text -