[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: YA daft C++ q
From:       Alex Zepeda <garbanzo () hooked ! net>
Date:       1999-06-23 1:11:12
[Download RAW message or body]

My first thouhght is perhaps you're using an old version of egcs?

On Tue, 22 Jun 1999, Rik Hemsley wrote:

> Ok, seeing as people are talking about using namespaces, I'm presuming it's ok
> to use them now.
> 
> I had a class which I was using as a namespace, with some enums, static
> methods, and some of this:
> static const QCString monthNames[]
> 
> I define the above in the .cpp file:
> 
> const QCString RMM::monthNames[] = { "Jan", "Feb" ... }
> 
> Now if I change the class to a namespace:
> 
> namespace RMM {
> 
>   static const QCString monthNames[];
>   ...
> 
> };
> 
> While the .cpp is still compiled to an object, and it's unchanged, I get
> undefined reference on linking to the QCString arrays.
> 
> The enums are ok, the static methods are converted to non-static, and they're
> ok, it's just the arrays.
> 
> Anyone know what I'm doing wrong ?
> 
> Note: Putting 'using RMM;' at the top of the .cpp doesn't work. Should it ? I'm
> just leaving the 'RMM::' on everything for now.

- alex

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic