2010/3/28 Adrien Bustany <mad...@mymadcat.com>:
>
> Thanks for the report! I have a few symbols that belong to my code, I'll
> fix that. BTW, couldn't we have a C macro to export symbols, something
> along the lines of
>
> TRACKER_EXPORT void
> tracker_my_function_that_should_be_public (void)
>
> rather than playing with regexps in the Makefile ? I've no idea of how it
> would be done though. I know KDE does it, so it should be doable.

I guess they use GCC visibility support.

There are a few methods how you can control which symbols are exported.
1/ If it's only used in the same source file, you can use static
2/ A linker version script, gives you full control over which symbols
are exported but needs to be kept up-to-date
3/ libtools -export-symbols(-regex) support (internally converted to a
version script)

3/ means the least work but also it can happen that symbols slip
through unintentionally.

Cheers,
Michael

[1] http://gcc.gnu.org/wiki/Visibility
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
_______________________________________________
tracker-list mailing list
tracker-list@gnome.org
http://mail.gnome.org/mailman/listinfo/tracker-list

Reply via email to