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

Visual Studio builds are broken. #258

Open
plaska-verys opened this issue Jun 8, 2020 · 0 comments
Open

Visual Studio builds are broken. #258

plaska-verys opened this issue Jun 8, 2020 · 0 comments

Comments

@plaska-verys
Copy link

plaska-verys commented Jun 8, 2020

When you try to build, using Visual Studio, with one of the following build configurations, Win32 | Release and x64 | Debug, Visual Studio provides the following errors:

1>C:\dev\github\xdelta\xdelta3\xdelta3.h(173,29): error C2065: 'SIZEOF_SIZE_T': undeclared identifier
1>C:\dev\github\xdelta\xdelta3\xdelta3.h(173,81): error C2057: expected constant expression
1>C:\dev\github\xdelta\xdelta3\xdelta3.h(179,41): error C2065: 'SIZEOF_UNSIGNED_LONG_LONG': undeclared identifier
1>C:\dev\github\xdelta\xdelta3\xdelta3.h(179,117): error C2057: expected constant expression
1>C:\dev\github\xdelta\xdelta3\xdelta3.h(259,1): fatal error C1189: #error:  Bad configure script
1>Done building project "xdelta3.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

The x64 | Release configuration also runs into the same issue, after an issue with include paths is resolved; this include path issue reports that it cannot include errno.h, and should be reported/handled separately. The Itanium | Debug and Itanium | Release configurations have another issue with the Output Path not being set, however, I have confirmed neither configuration has the required preprocessor definitions in their settings inside the xdelta3.vcxproj file.

The undeclared identifier errors occur because the preprocessor definitions do not exist in any of the configurations (other than Win32 | Debug). To fix the issue, either utilize the compilation time calculations of sizeof(size_t) and sizeof(unsigned long long) to define SIZEOF_SIZE_T and SIZEOF_UNSIGNED_LONG_LONG, respectively, or define the preprocessor symbols in the PreprocessorDefinitions segments of the rest of the configurations.

To repeat the issue:

  1. Open the xdelta3.vcxproj file in Visual Studio
  2. Select a build configuration, other than Win32 | Debug (or x64 | Release, due to the other issue with errno.h, until that is fixed)
  3. Select Build->Build Solution
  4. Observe the configuration fails to build.
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

No branches or pull requests

1 participant