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

Fixed compilation error with Visual Studio #649

Merged
merged 2 commits into from
Jun 2, 2023
Merged

Fixed compilation error with Visual Studio #649

merged 2 commits into from
Jun 2, 2023

Conversation

jrade
Copy link
Contributor

@jrade jrade commented May 27, 2023

When compiling with Visual Studio one gets the error

C:\Libraries\github\spotify\annoy\src\annoylib.h(1070,11): error C4996: 'open':
The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _open.

The functions open(), ... are not supported by MSVS 2019. Note that they are defined by the POSIX standard, not by the C++ standard. However, MSVS 2019 provides POSIX compatible functions named _open(), ... See also: https://learn.microsoft.com/en-us/cpp/c-runtime-library/compatibility?view=msvc-170

jrade added 2 commits May 27, 2023 18:13
When compiling with Visual Studio one gets the error

  C:\Libraries\github\spotify\annoy\src\annoylib.h(1070,11): error C4996: 'open':
  The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _open.

The functions open(), ... are not supported by MSVS 2019.
Note that they are defined by the POSIX standard, not by the C++ standard.
However, MSVS 2019 provides POSIX compatible functions named _open(), ...
See also: https://learn.microsoft.com/en-us/cpp/c-runtime-library/compatibility?view=msvc-170
@erikbern erikbern merged commit 7595fb3 into spotify:main Jun 2, 2023
15 checks passed
@erikbern
Copy link
Collaborator

erikbern commented Jun 2, 2023

Thanks!

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