You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tinyusdz_static fails to compile due to CreateFile resolves to CreateFileW needing wide-character string
Repro Steps
OS: Windows
Compiler: MSVC Visual Studio 2022
Update TinyUSDZ cmake for a project supporting other languages by adding add_compile_definitions(UNICODE)
Compile tinyusdz_static with UNICODE macro enabled
Results
1>D:\tinyusdz_repo-src\src\io-util.cc(158,7): error C2664: with
1>D:\tinyusdz_repo-src\src\io-util.cc(158,7): error C2664: [
1>D:\\tinyusdz_repo-src\src\io-util.cc(158,7): error C2664: _Elem=char
1>D:\\tinyusdz_repo-src\src\io-util.cc(158,7): error C2664: ]
1> D:\\tinyusdz_repo-src\src\io-util.cc(158,32):
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\fileapi.h(92,1):
1> see declaration of 'CreateFileW'
1> D:\\tinyusdz_repo-src\src\io-util.cc(158,7):
1> while trying to match the argument list '(const _Elem *, unsigned long, int, nullptr, int, int, nullptr)'
1> with
1> [
1> _Elem=char
1> ]
1>Done building project "tinyusdz_static.vcxproj" -- FAILED.
The text was updated successfully, but these errors were encountered:
AMZN-Gene
changed the title
Visual Studio Compile Fail: CreateFile() Requires LPCWSTR File Name
Visual Studio Compile Fail when Unicode Enabled: CreateFile() Requires LPCWSTR File Name
Dec 3, 2024
tinyusdz_static fails to compile due to CreateFile resolves to CreateFileW needing wide-character string
Repro Steps
OS: Windows
Compiler: MSVC Visual Studio 2022
add_compile_definitions(UNICODE)
Results
The text was updated successfully, but these errors were encountered: