This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linker fails with multiple definitions after inline thread_local var within class


You appear to be running into a conflict with Cygwin managing Windows TLS, as
Cygwin does its own messing around to support Unix/Linux/POSIX/g++ semantics for
TLS and everything else under Windows. You should either use the supplied API,
or write a Windows program that allows you to control TLS within Windows rules
on what you can do with it. Otherwise you will have to get deep into the
changeable and not directly supported underbelly of the Cygwin implementation.

Than you for the prompt response, but while the motivation for my example involved the Windows native TLS API the sample code that fails to link for me does not touch that at all and tried to be generic C++ code. Where it superficially appears that the cygwin TLS initialization code fails to pick up the "inline" attribute that I believe it should inherit from the fact that the TLS fields and methods that I use are inline and hence allowed to be defined/declared multiple times. So does my sample code that fails breach the C++ standard or is this a Cygwin limitation please? Arthur

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]