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

Fixes for Windows #847

Merged
merged 4 commits into from
Jan 11, 2021
Merged

Fixes for Windows #847

merged 4 commits into from
Jan 11, 2021

Conversation

KrisThielemans
Copy link
Member

Fixes #587

Also reduces number of warnings during compilation with VS (still far too many)

Doing this reduces dependencies on implementations of GadgetronClientWrapper
otherwise exposed.In particular, gadgetron_client.h includes boost::asio,
which on Windows includes a lot of Windows files, causing occasional trouble
with redefinition of Winsock.h, see SyneRBI#587.
We define WIN32_LEAN_AND_MEAN to try to overcome this, but if you include files
in the wrong order, you still have this problem.

This update therefore makes sure that boost::asio is only used include where it is needed.
one genuine fix, but one cop-out by disabling the warning for float conversions
use sprintf_s and strcpy_s for Visual Studio in headers. They are safer
(check buffer overrun) and avoid compiler warnings.

Potentially should be used for other compilers as well.
they don't seem to be needed, and we therefore get fewer warnings about them
@KrisThielemans
Copy link
Member Author

see commit messages for rationale

@KrisThielemans KrisThielemans merged commit 2e1d74a into SyneRBI:master Jan 11, 2021
@KrisThielemans KrisThielemans deleted the WINfixes branch January 11, 2021 12:53
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.

Windows 10 build errors
2 participants