🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: gnu.g++.lib.bug
2 messages
2 total messages Started by Naoki Saito Mon, 10 Aug 1992 04:10
Help on linking g++-2.2.2 with -Bstatic, iostream.
#33
Author: Naoki Saito
Date: Mon, 10 Aug 1992 04:10
30 lines
1573 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: Help on linking g++-2.2.2 with -Bstatic, iostream.
#255
Author: bothner
Date: Tue, 11 Aug 1992 04:35
11 lines
874 bytes
> This looks like libg++-2.1 still does not have the setprecision member
> function for ostream.

setprecison is not a member function, it is an io manipulator.
libg++-2.1 *does* have ios::precision(int) which can be used instead.

libg++-2.3 will have setprecision, and a complete template-based
iomanip.h (assuming a suitable fixed g++ is released before then).

	--Per Bothner
Cygnus Support     bothner@cygnus.com
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