[GH-ISSUE #250] The macro "SLIST_ENTRY" is redefined #199

Closed
opened 2026-05-05 11:54:15 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @ZChidori on GitHub (Nov 4, 2019).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/250

Originally assigned to: @jmcnamara on GitHub.

Question:The macro "SLIST_ENTRY" is redefined in winnt.h and third_party/queue.h,how to fix it?

Originally created by @ZChidori on GitHub (Nov 4, 2019). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/250 Originally assigned to: @jmcnamara on GitHub. Question:The macro "SLIST_ENTRY" is redefined in winnt.h and third_party/queue.h,how to fix it?
gitea-mirror 2026-05-05 11:54:15 -06:00
Author
Owner

@jmcnamara commented on GitHub (Nov 4, 2019):

What compiler and version are you using and what is your compilation target?

See also #57

<!-- gh-comment-id:549251158 --> @jmcnamara commented on GitHub (Nov 4, 2019): What compiler and version are you using and what is your compilation target? See also #57
Author
Owner

@ZChidori commented on GitHub (Nov 4, 2019):

VS2008 and libxlsxwriter-release-0.8.7

<!-- gh-comment-id:549254588 --> @ZChidori commented on GitHub (Nov 4, 2019): VS2008 and libxlsxwriter-release-0.8.7
Author
Owner

@ZChidori commented on GitHub (Nov 4, 2019):

Well,my vs environment don't have base.h.

<!-- gh-comment-id:549257513 --> @ZChidori commented on GitHub (Nov 4, 2019): Well,my vs environment don't have base.h.
Author
Owner

@jmcnamara commented on GitHub (Nov 4, 2019):

Are you trying to compile for WinNT?

Also, if you ignore the warning does the compilation work?

<!-- gh-comment-id:549259712 --> @jmcnamara commented on GitHub (Nov 4, 2019): Are you trying to compile for WinNT? Also, if you ignore the warning does the compilation work?
Author
Owner

@ZChidori commented on GitHub (Nov 4, 2019):

No,doesn't affect my use,I just want to solve it.In any case,thanks.

<!-- gh-comment-id:549261378 --> @ZChidori commented on GitHub (Nov 4, 2019): No,doesn't affect my use,I just want to solve it.In any case,thanks.
Author
Owner

@jmcnamara commented on GitHub (Nov 4, 2019):

Are you trying to compile for WinNT?

<!-- gh-comment-id:549261855 --> @jmcnamara commented on GitHub (Nov 4, 2019): Are you trying to compile for WinNT?
Author
Owner

@jmcnamara commented on GitHub (Nov 4, 2019):

The SLIST_ENTRY Windows macro should be undefined by libxlsxwriter to avoid this issue. See:

https://github.com/jmcnamara/libxlsxwriter/blob/master/src/packager.c#L40

Since your overall compilation works I presume this code is included so I'm not sure why you are getting the warning.

Try add the following before you use #include "xlsxwriter.h":

#undef SLIST_ENTRY
<!-- gh-comment-id:549297456 --> @jmcnamara commented on GitHub (Nov 4, 2019): The `SLIST_ENTRY` Windows macro should be undefined by libxlsxwriter to avoid this issue. See: https://github.com/jmcnamara/libxlsxwriter/blob/master/src/packager.c#L40 Since your overall compilation works I presume this code is included so I'm not sure why you are getting the warning. Try add the following before you use `#include "xlsxwriter.h"`: ```C #undef SLIST_ENTRY ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/libxlsxwriter#199
No description provided.