help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiler doesn't create some static class members


From: Paul Pluzhnikov
Subject: Re: Compiler doesn't create some static class members
Date: 03 Feb 2005 07:45:51 -0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)

johan_de_taeye@yahoo.com (Johan_De_Taeye) writes:

> Sorry, my code had some typo indeed...

Did you use google 'reply' button to post this message?
If so, google groups are even buggier then I thought :-(
If not, please *do* use it next time: this creates (or rather it
should create) a follow-up message, rather then starting a new
thread.

> Following the comparison with the librarian: The way the metadata is
> used seems to make it difficult for the librarian to understand that
> the metadata objects are required on its 'needed' list.

That means your code is not structured correctly.
It's not librarian's fault. The analogy would be:
you gave librarian a list with one specific book reference, and
she came back with that book. Now you are complaining that she
didn't also bring 10 other books, which you need but didn't tell
her about.

> I ended up adding a library initialization function like this:

That's one way. 

Another way would be to link all of the objects that construct
'{A,B,C}::meta' into a shared library. With shared libraries,
you get all or nothing.

A third way is to link objects explicitly:

  g++ -o foo.exe main.o a.o b.o c.o ...

[this is equivalent to explictly referencing the 10 books you need
by their ISBN number, so librarian knows exactly what you want.]

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]