Mail Archives: djgpp/1998/08/24/19:04:27
On Fri, 21 Aug 1998 16:43:49 -0300, Endlisnis <s257m AT unb DOT ca> wrote:
>Oliver Richman wrote:
>
>> from moo.cc:
>> const struct moostruct moovariable[] = { ... }
>>
>> from moo2.cc:
>> extern const struct moostruct moovariable[];
>>
>> I get an "undefined reference to moovariable" in moo2.cc.
>
> I tried compiling that, and it didn't work for me either. You can't have
>extern const data. I don't know why, but if you remove the 'const' it will work.
So there you have it. I wonder if it would work under another
compiler? As it turns out, I really want this data structure to be
const, but I guess you can't have everything. :)
-opr-
-- \ Two FREE games on my homepage, and more!
orichman at hotmail.com \ 1. NETWHACK (C++ port of NetHack)
www.pathcom.com/~simex/opr/index.html \ 2. DOS ROGUE 1.0 (1.1 coming soon!)
- Raw text -