mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #57] Warning about redefinition of SLIST_ENTRY #46
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @utelle on GitHub (Jun 29, 2016).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/57
Originally assigned to: @jmcnamara on GitHub.
The source file
packager.cincludes the header filewindows.h. At least using Visual C++ 2010 I get a warning that the symbolSLIST_ENTRYis redefined in header filewinnt.hwhich is indirectly included bywindows.h. It's just a warning and the symbol is not used inpackager.c, so no harm is done. However, it might be a good idea to rename the symbol inlibxlsxwriterto something else to avoid name clashes (and thus potential problems).@jmcnamara commented on GitHub (Jun 29, 2016):
Hi Ulrich,
I don't see that warning using this project in MSVC 2013.
The
SLIST_ENTRYis a macro definition of a struct and it comes from the FreeBSD/Linux headerqueue.hwhich is included with libxlsxwriter.So I think you will just have to live with this warning in MSVC 2010.
John
@utelle commented on GitHub (Jun 29, 2016):
Interesting. Maybe this warning is related to the Windows SDK in use - which might be different for MSVC 2013.
Some googling reveals that other projects seem to be affected, too. Some define a different symbol to avoid the warning. I also found a version of queue.h, which explicitly undefines the symbol before redefining it. However, the latter only works if
windows.his included beforequeue.h. Forlibxlsxwriterthis would currently not work, sincewindows.his included afterwards.Personally, I can live with the warning. So feel free to close this issue.
@jmcnamara commented on GitHub (Jun 29, 2016):
Okay. Thanks for the followup. Closing.
@jmcnamara commented on GitHub (Jul 3, 2016):
Hi,
I pushed a fix for this warning to master. Basically it undefs the macro before including
windows.h.When you get a chance you can try it and let me know if it fixes the warning on Windows.
John
@utelle commented on GitHub (Jul 3, 2016):
Yes, this eliminates the warning.