Skip to content

fix: windows crosscompiling#401

Closed
VincentMarnier wants to merge 2 commits into
AprilRobotics:masterfrom
VincentMarnier:master
Closed

fix: windows crosscompiling#401
VincentMarnier wants to merge 2 commits into
AprilRobotics:masterfrom
VincentMarnier:master

Conversation

@VincentMarnier

Copy link
Copy Markdown
Contributor

Windows crosscompilation is broken again. This fixes the issue. This is due to the fact that in mingw, Winsock2.h is winsock2.h, and is case sensitive. Might be winsock2.h in windows too, but I don't have a computer running windows to check, sadly.

@christian-rauch

Copy link
Copy Markdown
Collaborator

Could you also use __has_include on Windows? Can you add a configuration to the CI to verify that this does not break again?

@VincentMarnier

VincentMarnier commented Oct 2, 2025

Copy link
Copy Markdown
Contributor Author

I'll do that, no problem.
I didn't knew about the __has_include thing! Nice to learn ;)

@VincentMarnier

VincentMarnier commented Oct 2, 2025

Copy link
Copy Markdown
Contributor Author

For the CI part, it is way trickier than expected as I build it on linux and run it on windows.
I don't want to change cmake-multi-platform.yml too much.
How would you like me to do it?

@christian-rauch

Copy link
Copy Markdown
Collaborator

The cmake-multi-platform.yml loops over the Linux/macOS/Windows runners and runs the same procedure "natively" on the runner. I guess it is a bit complicated to squeeze the cross-compilation in there. I would create a new "cross-compilation" workflow to separate this better.

@VincentMarnier

Copy link
Copy Markdown
Contributor Author

Will test the CI on my side and reopen when ready, don't want to spam you

@christian-rauch

Copy link
Copy Markdown
Collaborator

Will test the CI on my side and reopen when ready, don't want to spam you

You can also open PRs in "Draft" state. I think that this does not send out notifications unless you switch it to "Ready".

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