public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC 3.2 Linker Problem with C, C++ and GNU Prolog code
@ 2002-10-11  6:05 Joseph Benden
  2002-10-11 12:22 ` std library docs Eduardo Osorio Armenta
  2002-10-11 18:45 ` GCC 3.2 Linker Problem with C, C++ and GNU Prolog code Joseph Benden
  0 siblings, 2 replies; 5+ messages in thread
From: Joseph Benden @ 2002-10-11  6:05 UTC (permalink / raw)
  To: gcc-help

I'm having a problem linking together the three mentioned object files
above using GCC 3.2.  If I specify the --allow-multiple-definition flag
to the linker, the objects do indeed link and work; however, on GCC 2.96
(RedHat 7.3) it all links together fine.

I'm confused as to why, but don't like the fact that I must add the
above flag.  Also, it doesn't properly compile on 2.96 (RedHat 7.1).

The code uses a ton of STL containers (strings, vectors,) GNU Prolog,
expat, mysql, etc.

The errors messages which I'm receiving are:



prefork.o(.bss+0x0): multiple definition of 'last_read_line'
child.o(.bss+0x4): first defined here
prefork.o(.bss+0x4): multiple definition of 'last_read_col'
child.o(.bss+0x8): first defined here
prefork.o(.bss+0x8): multiple definition of 'byte_code'
child.o(.bss+0xc): first defined here
CEpilog.o(.bss+0x0): multiple definition of 'last_read_line'
child.o(.bss+0x4): first defined here

... and a couple more of the same above type errors ...

All of the object mentioned above are C++ objects.  There are no
complaints from the linker about libraries, C objects or GNU Prolog
objects.

I've looked at the assembly code generated, but can not figure out where
these above names are defined...  They're not in my code nor in the
header files of libraries I'm using...  Do these errors have something
to do with the STL?

I'm lost...  I've searched around, but can not figure this one out...

Thanks,
Joseph Benden, Sr., CCNA
Vice President of Information Technology
AdWriter, Inc.

Professional Member of the Association of Computing Machinery (www.ACM.org)
Professional Member of the Network and System Professionals Association (www.NaSPA.org)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* std library docs
  2002-10-11  6:05 GCC 3.2 Linker Problem with C, C++ and GNU Prolog code Joseph Benden
@ 2002-10-11 12:22 ` Eduardo Osorio Armenta
  2002-10-11 12:28   ` Joshua Nye
  2002-10-11 18:45 ` GCC 3.2 Linker Problem with C, C++ and GNU Prolog code Joseph Benden
  1 sibling, 1 reply; 5+ messages in thread
From: Eduardo Osorio Armenta @ 2002-10-11 12:22 UTC (permalink / raw)
  To: gcc-help



where i can get information (pdf, ps, html)

about the std library in g++

i want to print hexadecimal with

cout.setf( ios::hex )

but does nothing!

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: std library docs
  2002-10-11 12:22 ` std library docs Eduardo Osorio Armenta
@ 2002-10-11 12:28   ` Joshua Nye
  2002-10-12  3:44     ` Sebastian Huber
  0 siblings, 1 reply; 5+ messages in thread
From: Joshua Nye @ 2002-10-11 12:28 UTC (permalink / raw)
  To: Eduardo Osorio Armenta, gcc-help

Try here for GCC 3.2 libstdc++ doc: 

http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-3.2/index.html

--josh

----- Original Message ----- 
From: "Eduardo Osorio Armenta" <e_osorio@yahoo.com>
To: <gcc-help@gcc.gnu.org>
Sent: Friday, October 11, 2002 3:22 PM
Subject: std library docs


> 
> 
> where i can get information (pdf, ps, html)
> 
> about the std library in g++
> 
> i want to print hexadecimal with
> 
> cout.setf( ios::hex )
> 
> but does nothing!
> 
> __________________________________________________
> Do you Yahoo!?
> Faith Hill - Exclusive Performances, Videos & More
> http://faith.yahoo.com
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GCC 3.2 Linker Problem with C, C++ and GNU Prolog code
  2002-10-11  6:05 GCC 3.2 Linker Problem with C, C++ and GNU Prolog code Joseph Benden
  2002-10-11 12:22 ` std library docs Eduardo Osorio Armenta
@ 2002-10-11 18:45 ` Joseph Benden
  1 sibling, 0 replies; 5+ messages in thread
From: Joseph Benden @ 2002-10-11 18:45 UTC (permalink / raw)
  To: Joseph Benden; +Cc: gcc-help

Nevermind.  It was a problem in the GNU Prolog include header.

For anyone else having the problem, define the below variables as extern
within the gprolog.h include.

This was with gprolog 1.2.14

Joseph Benden, Sr., CCNA
Vice President of Information Technology
AdWriter, Inc.

Professional Member of the Association of Computing Machinery (www.ACM.org)
Professional Member of the Network and System Professionals Association (www.NaSPA.org)

On Fri, 2002-10-11 at 09:05, Joseph Benden wrote:
> I'm having a problem linking together the three mentioned object files
> above using GCC 3.2.  If I specify the --allow-multiple-definition flag
> to the linker, the objects do indeed link and work; however, on GCC 2.96
> (RedHat 7.3) it all links together fine.
> 
> I'm confused as to why, but don't like the fact that I must add the
> above flag.  Also, it doesn't properly compile on 2.96 (RedHat 7.1).
> 
> The code uses a ton of STL containers (strings, vectors,) GNU Prolog,
> expat, mysql, etc.
> 
> The errors messages which I'm receiving are:
> 
> 
> 
> prefork.o(.bss+0x0): multiple definition of 'last_read_line'
> child.o(.bss+0x4): first defined here
> prefork.o(.bss+0x4): multiple definition of 'last_read_col'
> child.o(.bss+0x8): first defined here
> prefork.o(.bss+0x8): multiple definition of 'byte_code'
> child.o(.bss+0xc): first defined here
> CEpilog.o(.bss+0x0): multiple definition of 'last_read_line'
> child.o(.bss+0x4): first defined here
> 
> ... and a couple more of the same above type errors ...
> 
> All of the object mentioned above are C++ objects.  There are no
> complaints from the linker about libraries, C objects or GNU Prolog
> objects.
> 
> I've looked at the assembly code generated, but can not figure out where
> these above names are defined...  They're not in my code nor in the
> header files of libraries I'm using...  Do these errors have something
> to do with the STL?
> 
> I'm lost...  I've searched around, but can not figure this one out...
> 
> Thanks,
> Joseph Benden, Sr., CCNA
> Vice President of Information Technology
> AdWriter, Inc.
> 
> Professional Member of the Association of Computing Machinery (www.ACM.org)
> Professional Member of the Network and System Professionals Association (www.NaSPA.org)
> 
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: std library docs
  2002-10-11 12:28   ` Joshua Nye
@ 2002-10-12  3:44     ` Sebastian Huber
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastian Huber @ 2002-10-12  3:44 UTC (permalink / raw)
  To: gcc-help

Or the SGI documentation:
http://www.sgi.com/tech/stl/

On Friday 11 October 2002 12:28, Joshua Nye wrote:
> Try here for GCC 3.2 libstdc++ doc:
>
> http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-3.2/index.html
>
> --josh
>
> ----- Original Message -----
> From: "Eduardo Osorio Armenta" <e_osorio@yahoo.com>
> To: <gcc-help@gcc.gnu.org>
> Sent: Friday, October 11, 2002 3:22 PM
> Subject: std library docs
>
> > where i can get information (pdf, ps, html)
> >
> > about the std library in g++
> >
> > i want to print hexadecimal with
> >
> > cout.setf( ios::hex )
> >
> > but does nothing!
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Faith Hill - Exclusive Performances, Videos & More
> > http://faith.yahoo.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-10-12 10:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-11  6:05 GCC 3.2 Linker Problem with C, C++ and GNU Prolog code Joseph Benden
2002-10-11 12:22 ` std library docs Eduardo Osorio Armenta
2002-10-11 12:28   ` Joshua Nye
2002-10-12  3:44     ` Sebastian Huber
2002-10-11 18:45 ` GCC 3.2 Linker Problem with C, C++ and GNU Prolog code Joseph Benden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).