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 on Windows #57

Merged
merged 1 commit into from
Apr 13, 2021
Merged

Fix compilation on Windows #57

merged 1 commit into from
Apr 13, 2021

Conversation

pierotofy
Copy link
Contributor

@pierotofy pierotofy commented Apr 9, 2021

Hello ✋

Trying to compile Untwine on Windows (Windows 10, Visual Studio 2019) I get the following:

  Untwine.cpp
D:\ddb\untwine\untwine\MapFile.cpp(50,18): error C2039: '_open': is not a member of '`global namespace'' [D:\ddb\untwin
e\build\untwine.vcxproj]
D:\ddb\untwine\untwine\MapFile.cpp(50,53): error C2065: '_O_RDONLY': undeclared identifier [D:\ddb\untwine\build\untwin
e.vcxproj]
D:\ddb\untwine\untwine\MapFile.cpp(50,65): error C2065: '_O_RDWR': undeclared identifier [D:\ddb\untwine\build\untwine.
vcxproj]
D:\ddb\untwine\untwine\MapFile.cpp(50,23): error C3861: '_open': identifier not found [D:\ddb\untwine\build\untwine.vcx
proj]
D:\ddb\untwine\untwine\MapFile.cpp(68,46): error C3861: '_get_osfhandle': identifier not found [D:\ddb\untwine\build\un
twine.vcxproj]
D:\ddb\untwine\untwine\MapFile.cpp(103,7): error C2039: '_close': is not a member of '`global namespace'' [D:\ddb\untwi
ne\build\untwine.vcxproj]
D:\ddb\untwine\untwine\MapFile.cpp(103,13): error C3861: '_close': identifier not found [D:\ddb\untwine\build\untwine.v
cxproj]
D:\ddb\untwine\epf\FileProcessor.cpp(77,1): error C3493: 'CountIncrement' cannot be implicitly captured because no defa
ult capture mode has been specified [D:\ddb\untwine\build\untwine.vcxproj]

So I did the following:

  • Include fcntl.h and io.h which on Windows provide the functions / constants being reported as missing.
  • Set a capture mode for CountIncrement.

Let me know if changes are needed.

@abellgithub
Copy link
Collaborator

Thanks. I'll verify. Maybe I'll have time to set up some CI.

@hobu hobu merged commit ac825cd into hobuinc:main Apr 13, 2021
@hobu
Copy link
Collaborator

hobu commented Apr 13, 2021

Confirmed this fixes for me on 2017.

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.

3 participants