Re: C++ templates and visibility("hidden")

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

 



On Saturday 09 April 2005 6:27 pm, Stefan Strasser wrote:
> > Okay, I did s,MY_API class,class MY_API. Now, when using colorgcc, I even
> > saw the warning you hinted me :)
> >
> > However, when playing a bit around, I see, that I've to explicitely do:
> >
> > template<class T>
> > void FOO_API TFoo<T>::bar(const T& var) {
> >     std::cout << "TFoo::bar(" << var << ")" << std::endl;
> > }
>
> no you don't.
> I don't know what's wrong with your example but the following works:
[.....]

the difference between your example and my little test-case is/was that you've 
defined API empty when compiling the test program but have defined API with 
__attribute__((visibility("default"))) when compiling the shared object.

That's interesting, as it even works with gcc 3.4.3 and my recent gcc4 
snapshot.

Let's see what my real library sais about this....

Thanks so far,
Christian Parpart.

-- 
Netiquette: http://www.ietf.org/rfc/rfc1855.txt
 17:32:48 up 17 days,  6:39,  1 user,  load average: 0.80, 0.59, 0.57

Attachment: pgpR35KqMmQ4o.pgp
Description: PGP signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux