pico-sdk icon indicating copy to clipboard operation
pico-sdk copied to clipboard

Fix compile errors when building pioasm with clang x86_64-pc-windows-msvc

Open kkitayam opened this issue 3 years ago • 0 comments

When building pioasm with clang x86_64-pc-windows-msvc and Windows 10 SDK, the following error occurs. This PR fixes the errors.

[1/2] Building CXX object CMakeFiles/pioasm.dir/gen/lexer.cpp.obj
FAILED: CMakeFiles/pioasm.dir/gen/lexer.cpp.obj
C:\PROGRA~1\LLVM\bin\CLANG_~1.EXE  -IC:/pico-sdk/tools/pioasm -IC:/pico-sdk/tools/pioasm/gen -g -Xclang -gcodeview -O0 -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd -std=gnu++14 -MD -MT CMakeFiles/pioasm.dir/gen/lexer.cpp.obj -MF CMakeFiles\pioasm.dir\gen\lexer.cpp.obj.d -o CMakeFiles/pioasm.dir/gen/lexer.cpp.obj -c C:/pico-sdk/tools/pioasm/gen/lexer.cpp
lexer.ll:38:10: fatal error: 'unistd.h' file not found
#include <unistd.h>
         ^~~~~~~~~~
1 error generated.

Environment details:

clang version 14.0.6 Target: x86_64-pc-windows-msvc Thread model: posix InstalledDir: C:\Program Files\LLVM\bin

Windows SDK 10.0.17763.0 Microsoft Visual Studio 2017

kkitayam avatar Sep 29 '22 12:09 kkitayam