HP3000-L Archives

August 2001, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
John Bode <[log in to unmask]>
Reply To:
John Bode <[log in to unmask]>
Date:
Tue, 14 Aug 2001 14:15:27 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (21 lines)
I'm working on a set of C++ classes to encapsulate pthreads for a
system which will eventually run on MPE and Linux, and I've run into a
problem on the MPE side.  The pthread.h file defines two variables at
file scope, 'pthd_push_pop_once_flag' and '_pthd_cleanup_key'.  If
pthread.h gets #included into more than one source file (which it
inevitably does), I get a duplicate symbol error at link time (LINKERR
1015).

I've come up with a spectacularly hideous workaround for the short
term, but I would like to know if there is a way to tell the linker to
force multiple instances of the symbols to resolve to the same
locations, or if there is a patch for pthread.h that doesn't define
them at file scope.

This is with g++ 2.95.2, MPE/iX 6.5.

Thanks in advance.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2