Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compilation with mingw #17

Merged
merged 1 commit into from
Jun 14, 2023
Merged

Conversation

wdlkmpx
Copy link

@wdlkmpx wdlkmpx commented Jun 13, 2023

_Sleep' referenced in section .text' of libargp.a(argp-parse.c.o): defined in discarded section `.text' of /.../lib/libkernel32.a(dvclds01385.o)

https://stackoverflow.com/questions/31085538/function-referenced-in-section-text-of-defined-in-discarded-section-te

`_Sleep' referenced in section `.text' of libargp.a(argp-parse.c.o): defined in discarded section `.text' of /.../lib/libkernel32.a(dvclds01385.o)

https://stackoverflow.com/questions/31085538/function-referenced-in-section-text-of-defined-in-discarded-section-te
@guijan
Copy link
Collaborator

guijan commented Jun 14, 2023

Can't reproduce the bug, I'm using MSYS2's MINGW64 environment on a Windows 10 machine. Compiling and passing --HANG to one of the examples (which exercises the code that calls Sleep()) works. Is there anything I'm missing?

Will merge later anyway.

@wdlkmpx
Copy link
Author

wdlkmpx commented Jun 14, 2023

I'm cross compiling from Linux for mingw i686

@guijan
Copy link
Collaborator

guijan commented Jun 14, 2023

Makes sense, 32-bit Windows is the one that has many calling conventions and stackoverflow says this is due to functions with different calling conventions having different symbols on Windows.

I've cross compiled for i686 mingw and confirmed that the bug is present in master as well that this PR fixes it by running the binary on a real Windows system.

@guijan guijan merged commit 2c11c34 into argp-standalone:master Jun 14, 2023
3 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.

None yet

2 participants