gdc and gcc object linking issues

Regan Heath regan at netmail.co.nz
Thu Jun 7 07:29:24 PDT 2012


On Thu, 07 Jun 2012 15:12:46 +0100, Andrej Mitrovic  
<andrej.mitrovich at gmail.com> wrote:

> On 6/7/12, Kagamin <spam at here.lot> wrote:
>> If you define a
>> variable in the header, it will be included in each including
>> module and you'll get several instances of the variable and
>> symbol collision at link time.
>
> This wasn't a collision error, it was a missing symbol error. The
> variable is static, so it should be in the data or bss segment. You
> seem to be talking about instance variables but that wasn't the issue
> here.

I don't think he was posting a solution to the OP, he was just describing  
some background :)

In the quoted passage above I suspect he was referring to a static/global  
variable defined in a C header, not a C++ class member static or otherwise.

R

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/


More information about the Digitalmars-d-learn mailing list