I was having the same problem with Visual C++, and I "solved" it by using a
#pragma macro that creates an explicit reference to a symbol (basically I
have a header to be included by the library users that contains all the
#pragma for the static members I want to add references to).To use the
librarian analogy, it simply adds names to the "needed list" before going
through the bookshelves.
Is there something similar usable with g++ ?
Thanks,
--
Nicolas
"Paul Pluzhnikov" <[EMAIL PROTECTED]> a �crit dans le message de
news: [EMAIL PROTECTED]
> [EMAIL PROTECTED] (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.
_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus