Thread View: gnu.g++.help
2 messages
2 total messages
Started by Naoki Saito
Thu, 06 Aug 1992 18:52
gcc-2.2.2, linker, iostream
Author: Naoki Saito
Date: Thu, 06 Aug 1992 18:52
Date: Thu, 06 Aug 1992 18:52
29 lines
1598 bytes
1598 bytes
Hello! We just installed the gcc-2.2.2 and libg++-2.1. I have a program which were successfully compiled and linked under Sun C++ 2.0. gcc-2.2.2 compiled this code but not linked successfully. (We are not using GNU ld, I think). Two things happened at the linkage time: 1. I have the following error message. $ g++ -g -O -L../test -o prog prog.o -Bstatic -ltest -lg++ -lm ld: -ltest: expected libx.so(.major.minor.xxx) collect: /usr/bin/ld returned 4 exit status /usr/local/bin/gcc: file path prefix `static' never used 2. If I explicitly specify my own library libtest.a as: $ g++ -g -O -o prog prog.o -Bstatic ../test/libtest.a -lg++ -lm ld: Undefined symbol _setprecision collect: /usr/bin/ld returned 1 exit status /usr/local/bin/gcc: file path prefix `static' never used This looks like libg++-2.1 still does not have the setprecision member function for ostream. I would appreciate your help in these two problems. --- Naoki Saito (saito@sdr.slb.com or saito@math.yale.edu) Schlumberger-Doll Research and Yale University
Re: gcc-2.2.2, linker, iostream
Author: Tan Koan-Sin
Date: Mon, 10 Aug 1992 21:13
Date: Mon, 10 Aug 1992 21:13
24 lines
1682 bytes
1682 bytes
saito@sdr.slb.com (Naoki Saito) writes: : Hello! We just installed the gcc-2.2.2 and libg++-2.1. I have a program which : were successfully compiled and linked under Sun C++ 2.0. gcc-2.2.2 compiled this : code but not linked successfully. (We are not using GNU ld, I think). : : Two things happened at the linkage time: : : 1. I have the following error message. : $ g++ -g -O -L../test -o prog prog.o -Bstatic -ltest -lg++ -lm : ld: -ltest: expected libx.so(.major.minor.xxx) : : collect: /usr/bin/ld returned 4 exit status : /usr/local/bin/gcc: file path prefix `static' never used RTFM, gcc's -B is not the same Sun's CC. (If you want to use static biding, the option is "-static" ). -- -------------------------------------------------------------------------------- Tan Koan-Sin ( Chen Guan-Chen) |e-mail : Computer Center | cp78085@csie.nctu.edu.tw Dept of Computer Science & Information Eng.| freedom@csie.nctu.edu.tw National Chiao-Tung Univ., Hsin-chu | freedom@voltaire.csie.nctu.edu.tw Taiwan | tel: 886-35-712121 ext 6430
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads