[GH-ISSUE #262] Compiling error in GCC<5 #210

Closed
opened 2026-05-05 11:55:55 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @RaFaeL-NN on GitHub (Jan 8, 2020).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/262

Originally assigned to: @jmcnamara on GitHub.

I am using GCC 3.4.5 and get error

In file included from ../include/xlsxwriter/app.h:14,
                 from app.c:11:
../include/xlsxwriter/workbook.h:961: error: wrong number of arguments specified for `deprecated' attribute

It's because of "deprecated" from C++14. GCC supports C++14 from version 5 ("deprecated" from 4.9). Can you change

#ifdef __GNUC__

in common.h to

#if __GNUC__ >=5

?

Originally created by @RaFaeL-NN on GitHub (Jan 8, 2020). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/262 Originally assigned to: @jmcnamara on GitHub. I am using GCC 3.4.5 and get error ``` In file included from ../include/xlsxwriter/app.h:14, from app.c:11: ../include/xlsxwriter/workbook.h:961: error: wrong number of arguments specified for `deprecated' attribute ``` It's because of "deprecated" from C++14. GCC supports C++14 from version 5 ("deprecated" from 4.9). Can you change `#ifdef __GNUC__` in common.h to `#if __GNUC__ >=5` ?
gitea-mirror 2026-05-05 11:55:55 -06:00
Author
Owner

@jmcnamara commented on GitHub (Jan 9, 2020):

Done. Fixed on master.

<!-- gh-comment-id:572322933 --> @jmcnamara commented on GitHub (Jan 9, 2020): Done. Fixed on master.
Author
Owner

@RaFaeL-NN commented on GitHub (Jan 9, 2020):

Done. Fixed on master.

I think "> 5" is not right, " >= 5" is

<!-- gh-comment-id:572324671 --> @RaFaeL-NN commented on GitHub (Jan 9, 2020): > Done. Fixed on master. I think "> 5" is not right, " >= 5" is
Author
Owner

@jmcnamara commented on GitHub (Jan 9, 2020):

I fixed that after the push. It is on master already.

<!-- gh-comment-id:572324965 --> @jmcnamara commented on GitHub (Jan 9, 2020): I fixed that after the push. It is on master already.
Author
Owner

@jmcnamara commented on GitHub (Jan 9, 2020):

Thanks by the way.

<!-- gh-comment-id:572325097 --> @jmcnamara commented on GitHub (Jan 9, 2020): Thanks by the way.
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#210
No description provided.