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

FLAC failed to build due to error C2375 on windows with MSVC #152

Closed
spacelg opened this issue Oct 17, 2019 · 4 comments
Closed

FLAC failed to build due to error C2375 on windows with MSVC #152

spacelg opened this issue Oct 17, 2019 · 4 comments

Comments

@spacelg
Copy link

spacelg commented Oct 17, 2019

Environment:
Windows Server 2016 + VS2017 + flac master branch latest source code.

Issue description:
I tried to build flac using VS2017 on Windows Server 2016. We found that flac failed to build due to error C2375: 'flac_internal_set_utf8_filenames': redefinition; different linkage. It can be first reproduced on b917d45 revision. Could you please help take a look at this? Thanks in advance!

Repro steps:

  1. git clone https://github.com/xiph/flac D:\FLAC\src
  2. Open a VS 2017 x86 command prompt as admin and browse to D:\FLAC\src
  3. devenv /upgrade FLAC.sln
  4. msbuild FLAC.sln /t:Rebuild /p:Configuration=Release;Platform=Win32 /p:WindowsTargetPlatformVersion=10.0.17134.0

log_x86_build.log

Actual result:
D:\FLAC\src\src\libFLAC\windows_unicode_filenames.c(67): error C2375: 'flac_internal_set_utf8_filenames': redefinition; different linkage [D:\FLAC\src\src\libFLAC\libFLAC_dynamic.vcxproj]
D:\FLAC\src\src\libFLAC\windows_unicode_filenames.c(72): error C2375: 'flac_internal_get_utf8_filenames': redefinition; different linkage [D:\FLAC\src\src\libFLAC\libFLAC_dynamic.vcxproj]
D:\FLAC\src\src\libFLAC\windows_unicode_filenames.c(79): error C2375: 'flac_internal_fopen_utf8': redefinition; different linkage [D:\FLAC\src\src\libFLAC\libFLAC_dynamic.vcxproj]
D:\FLAC\src\src\libFLAC\windows_unicode_filenames.c(101): error C2375: 'flac_internal_stat64_utf8': redefinition; different linkage [D:\FLAC\src\src\libFLAC\libFLAC_dynamic.vcxproj]
D:\FLAC\src\src\libFLAC\windows_unicode_filenames.c(117): error C2375: 'flac_internal_chmod_utf8': redefinition; different linkage [D:\FLAC\src\src\libFLAC\libFLAC_dynamic.vcxproj]
D:\FLAC\src\src\libFLAC\windows_unicode_filenames.c(133): error C2375: 'flac_internal_utime_utf8': redefinition; different linkage [D:\FLAC\src\src\libFLAC\libFLAC_dynamic.vcxproj]
D:\FLAC\src\src\libFLAC\windows_unicode_filenames.c(152): error C2375: 'flac_internal_unlink_utf8': redefinition; different linkage [D:\FLAC\src\src\libFLAC\libFLAC_dynamic.vcxproj]

@erikd
Copy link
Member

erikd commented Oct 17, 2019

@evpobr ?

@evpobr
Copy link
Contributor

evpobr commented Oct 17, 2019

Open a VS 2017 x86 command prompt as admin and browse to D:\FLAC\src

@spacelg , correct me if i wrong - we are talking about FLAC.sln in root directory, not CMake generated one? I don't see FLAC.sln in src/ directory.

@sezero
Copy link
Contributor

sezero commented Oct 17, 2019

Does the attached patch help?

patch.txt

@sezero
Copy link
Contributor

sezero commented Oct 18, 2019

See #153

@erikd erikd closed this as completed in 25305d6 Oct 19, 2019
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

4 participants