From: Earnie <ea...@us...> - 2011-11-22 12:45:15
|
Kai Tietz wrote: > 2011/11/21 Roumen Petrov <bug...@ro...>: >> Hi Chuck, >> >> Charles Wilson wrote: >>> On 11/20/2011 10:18 AM, Earnie wrote: >>> >>>> Can someone who has Cygwin installed tell me if this issue exists for >>>> Cygwin gcc-4.6.1? If so does this fix resolve the issue? >>>> >>> I can try later this evening if necessary -- but only with cygwin >>> gcc-4.5.3. Dave has not yet uploaded any cygwin 4.6.x version, not even >>> as a test release. So...if 4.5.3 is ok, I can test that -- but if you >>> really need verification with 4.6.x on cygwin...then maybe Dave has a >>> version he's working on -- but I don't plan on building a cygwin 4.6.x >>> toolchain from scratch just to test a one-liner change in libxml! >>> >> >> Earnie report issue with 4.6x mingw target. I guess that cygwin test with 4.5.3 will pass. >> >> It is one line change for mingw but not for cygwin. >> a) it is a regression in gcc => so it will be fixed and libxml could >> left as is for both host mingw* and cygwin. >> b) gcc 4.6+ correct one long standing bug => libxml has to be fixed for >> mingw* and cygwin hosts and libxslt has to be fixed for cygwin . Also >> did gcc 4.6+ announce that exported variables has to be defined as >> extern in addtion to dllexport specification ? >> >> Note that libxml work fine since I use it before mingw.org to announce >> gcc 4+ . >> >>> -- >>> Chuck >>> >> Roumen > > Roumen, > > this is a long standing bug in libxml. That older gcc are producing > here a working DLL is just by chance. Even for Windows targets it > makes a difference if you are doing a forwarder-declaration for > variables via 'extern' symbol, or if you don't. The attribute > dllexport never had intentional semantics of being a 'extern'. From: http://msdn.microsoft.com/en-us/library/y4h7bcy6.aspx The use of dllexport implies a definition, while dllimport implies a declaration. You must use the extern keyword with dllexport to force a declaration; otherwise, a definition is implied. -- Earnie -- https://sites.google.com/site/earnieboyd/ |