defert@cernapo (Philippe Defert) (05/02/91)
I built succesfully InterViews libraries 3.0 beta. It needed some hacks in Unidraw but the problem is reported to interviews people. Building the "doc" program, a wysiwyg documentation formatter, I got the following strange problem: The ostream::put(char) is undefined in /usr/lib/libC.a If I had the -lOstream library, then I have got many redefined symbols and no executable is generated. What did I do wrong ? Did any C++ guru already faced this problem ? Thanks for your help. Philippe. --------------------------------+--------------------------------------------- Philippe Defert: Computing and Networks Division European Organisation for Nuclear Research (CERN) --------------------------------+--------------------------------------------- Earth mail: | E-mail: CERN / CN / AS | defert@cernvax.cern.ch CH-1211 Geneve 23. Switzerland. | defert@cernvax.UUCP Voice: | defert@cernvax.bitnet + 41 22 7674933 | psi%02284681140551::defert -------------------------- link log with libC.a only ----------------------- linking a.out CC +p -D__STDC__ -v -A cpu,3000 -A runtype,bsd4.3 -A systype,any -o a.out Ap plication.o Document.o DocumentViewer.o Item.o ItemView.o PSFigItem.o PSFigView. o TabularItem.o TabularView.o TextItem.o TextView.o MinipageView.o PagingView.o CounterItem.o CounterView.o LabelItem.o LabelView.o RefItem.o RefView.o FloatIte m.o FloatView.o PagenumberItem.o PagenumberView.o main.o Command.o DialogManager .o Figure.o InsertMarker.o Menus.o Keymap.o NoPrint.o PageBorder.o PageButton.o PPM_Image.o PGM_Image.o IdrawImage.o dialogs.o -L../../../.././src/lib/IV-lo ok/APOLLO -lIV-look -L../../../.././src/lib/InterViews/APOLLO -lInterViews -L.. /../../.././src/lib/IV-X11/APOLLO -lIV-X11 -L../../../.././src/lib/Dispatch/APOL LO -lDispatch -L../../../.././src/lib/OS/APOLLO -lOS -A,inlib,/usr/local/lib/x 11r4lib -lm /bin/cc -A cpu,3000 -A runtype,bsd4.3 -A systype,any -A inlib,/usr/local/lib/x1 1r4lib -o a.out Application.o Document.o DocumentViewer.o Item.o ItemView.o PSFi gItem.o PSFigView.o TabularItem.o TabularView.o TextItem.o TextView.o MinipageVi ew.o PagingView.o CounterItem.o CounterView.o LabelItem.o LabelView.o RefItem.o RefView.o FloatItem.o FloatView.o PagenumberItem.o PagenumberView.o main.o Comma nd.o DialogManager.o Figure.o InsertMarker.o Menus.o Keymap.o NoPrint.o PageBord er.o PageButton.o PPM_Image.o PGM_Image.o IdrawImage.o dialogs.o -L ../../../../ ./src/lib/IV-look/APOLLO -lIV-look -L ../../../.././src/lib/InterViews/APOLLO -l InterViews -L ../../../.././src/lib/IV-X11/APOLLO -lIV-X11 -L ../../../.././src/ lib/Dispatch/APOLLO -lDispatch -L ../../../.././src/lib/OS/APOLLO -lOS -lm -lC > /usr/tmp/AAAa13906 2>&1 /usr/apollo/bin/c++filt </usr/tmp/AAAa13906 undefined first referenced symbol in file ostream::put(char) Document.o ld warning: Output file a.out not executable removing /usr/tmp/AAAa13906 ---------------------------------- link log with libOstream.a ----------- If I add a -lOstream, or Oout.o extracted from /usr/lib/libOstream.a containing the definition of ostream::put, here is the result: linking a.out CC +p -D__STDC__ -A cpu,3000 -A runtype,bsd4.3 -A systype,any -o a.out Appli cation.o Document.o DocumentViewer.o Item.o ItemView.o PSFigItem.o PSFigView.o T abularItem.o TabularView.o TextItem.o TextView.o MinipageView.o PagingView.o Cou nterItem.o CounterView.o LabelItem.o LabelView.o RefItem.o RefView.o FloatItem.o FloatView.o PagenumberItem.o PagenumberView.o main.o Command.o DialogManager.o Figure.o InsertMarker.o Menus.o Keymap.o NoPrint.o PageBorder.o PageButton.o PPM _Image.o PGM_Image.o IdrawImage.o dialogs.o -L../../../.././src/lib/IV-look/ APOLLO -lIV-look -L../../../.././src/lib/InterViews/APOLLO -lInterViews -L../.. /../.././src/lib/IV-X11/APOLLO -lIV-X11 -L../../../.././src/lib/Dispatch/APOLLO -lDispatch -L../../../.././src/lib/OS/APOLLO -lOS -A,inlib,/usr/local/lib/x11r 4lib Oout.o -lm ld: Symbol cerr in /usr/lib/libC.a is multiply defined. First defined in Oout.o ld: Symbol cout in /usr/lib/libC.a is multiply defined. First defined in Oout.o ld: Symbol ostream::operator<<(double) in /usr/lib/libC.a is multiply defined. F irst defined in Oout.o ld: Symbol ostream::operator<<(const char*) in /usr/lib/libC.a is multiply defin ed. First defined in Oout.o ld: Symbol ostream::operator<<(long) in /usr/lib/libC.a is multiply defined. Fir -- --------------------------------+--------------------------------------------- Philippe Defert: Computing and Networks Division European Organisation for Nuclear Research (CERN) --------------------------------+--------------------------------------------- Earth mail: | E-mail: CERN / CN / AS | defert@cernvax.cern.ch CH-1211 Geneve 23. Switzerland. | defert@cernvax.UUCP Voice: | defert@cernvax.bitnet + 41 22 7674933 | psi%02284681140551::defert
vasta@apollo.HP.COM (John Vasta) (05/11/91)
In article <DEFERT.91May2161919@calypse.cern.ch> defert@cernapo (Philippe Defert) writes: > >Building the "doc" program, a wysiwyg documentation formatter, I got >the following strange problem: > >The ostream::put(char) is undefined in /usr/lib/libC.a In C++ 2.1.0, ostream::put(char) is an inline function (defined in /usr/include/CC/iostream.h), so it would not appear in the library. I haven't looked at InterViews 3.0 yet, but I suspect that your problem must be caused by an InterViews version of stream.h or iostream.h which declares things in conflict with the Domain C++ library. The InterViews 2.6 release came with its own stream I/O library which should not be used with Domain/C++, so perhaps the 3.0 release does also? John Vasta Hewlett-Packard Apollo Systems Division vasta@apollo.hp.com M.S. CHR-03-DW (508) 256-6600 x5978 300 Apollo Drive, Chelmsford, MA 01824 UUCP: {decwrl!decvax, mit-eddie, attunix}!apollo!vasta