Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: Martin Knoblauch <knobi@munich.sgi.com>
To: "Jochen K�pper" <jochen@uni-duesseldorf.de>
Subject: Re: trouble with 'external read only' in dynamic library - segv
Date: 1997/10/06	[thread overview]
Message-ID: <343896FD.92818F2D@munich.sgi.com> (raw)
In-Reply-To: 34379D50.41C6@uni-duesseldorf.de

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1588 bytes --]


Jochen K�pper wrote:
> 
> Dear All,
> 
> I am using g++ and libg++ for software development.
> 
> PROBLEM:
> ========
> 
> I am trying to put some arrays into a library, one of the array is
> defined as:
> 
> #include <string>
> const string symbol[] = {  "  ",
>                            "h ", "he", "li", "be", "b ",
>                            "c ", "n ", "o ", "f ", "ne",
>                            "na", "mg", "al", "si", "p ",
>                            "s ", "cl", "ar"
> };
> 
> If I put that into an object file archive, everything is working as
> expected, but if I create a dynamic link library, I get a
> segmatation fault whenever I try to access the array. But the
> array is in the library:
> 
>
Jochen,

 how are you building the DLL? Your problem sounds like the
initialization routine for that array is never called. On our
(SGI) platform, the rule is to use the C++ compiler to link
the library.

Martin
-- 
+---------------------------------+-----------------------------------+
|Martin Knoblauch                 | Silicon Graphics GmbH             |
|Manager Technical Marketing      | Am Hochacker 3 - Technopark       |
|Silicon Graphics Computer Systems| D-85630 Grasbrunn-Neukeferloh, FRG|
|---------------------------------| Phone: (+int) 89 46108-179 or -0  |
|http://reality.sgi.com/knobi     | Fax:   (+int) 89 46107-179        |
+---------------------------------+-----------------------------------+
|e-mail: <knobi@munich.sgi.com>   | VM: 6-333-8179 | M/S: IDE-3150    |
+---------------------------------------------------------------------+



  reply	other threads:[~1997-10-06  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-05  4:00 trouble with 'external read only' in dynamic library - segv Jochen Küpper
1997-10-06  4:00 ` Martin Knoblauch [this message]
1997-10-06  4:00   ` Jochen Küpper
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox