Skip to content

[CYGWIN][MINGW] Remove DJINTEROP_PUBLIC, enum doesn't export symbols - #192

Merged
mr-smidge merged 2 commits into
xsco:mainfrom
carlo-bramini:fix-mingw-cygwin-build
Jul 22, 2026
Merged

[CYGWIN][MINGW] Remove DJINTEROP_PUBLIC, enum doesn't export symbols#192
mr-smidge merged 2 commits into
xsco:mainfrom
carlo-bramini:fix-mingw-cygwin-build

Conversation

@carlo-bramini

Copy link
Copy Markdown
Contributor

I tried to build libdjinterop with both MinGW and Cygwin, but this error comes out:

include/djinterop/engine/engine_schema.hpp:31:29: error: ‘dllexport’ attribute ignored [-Werror=attributes]
   31 | enum class DJINTEROP_PUBLIC engine_schema
      |                             ^~~~~~~~~~~~~

In my opinion, this error is correct because an enum does not generate binary symbols, so GCC tells us that the attribute has no effect and the -Werror option handles it as an error.
I could not understand why it has been done here too because PR #142 doesn't write any information about the reasons of this change.
In my opinion, this attribute must be removed from that point.
Perhaps MSVC tolerates it, but a more strict compiler like GCC does not.

@mr-smidge

Copy link
Copy Markdown
Contributor

Hi @carlo-bramini , thanks for this - I agree with your suggestion that putting dllexport on the enum is incorrect, so the PR looks good.

How do you feel about also adding a new entry in .github/workflows/cmake.yml on Windows 2025 making use of msys2 to prove that this works? https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md#msys2

Please may you also bump up the patch version number in CMakeLists.txt? (to 0.27.3)

Thank you!

@carlo-bramini

Copy link
Copy Markdown
Contributor Author

How do you feel about also adding a new entry in .github/workflows/cmake.yml on Windows 2025 making use of msys2 to prove that this works? https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md#msys2

I think that's a good idea, but unfortunately I never played with workflows at the moment, so I don't know how this works and it could be done, I'm sorry.

Please may you also bump up the patch version number in CMakeLists.txt? (to 0.27.3)

I added an extra commit with this change.
Thank you very much for your quick reply.

@mr-smidge

Copy link
Copy Markdown
Contributor

How do you feel about also adding a new entry in .github/workflows/cmake.yml on Windows 2025 making use of msys2 to prove that this works? https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md#msys2

I think that's a good idea, but unfortunately I never played with workflows at the moment, so I don't know how this works and it could be done, I'm sorry.

No worries, I can look into this another time.

LGTM otherwise, so happy to approve!

@mr-smidge
mr-smidge merged commit 85f0622 into xsco:main Jul 22, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants