[cfe-dev] Compiling clang/llvm undeclared strndup().
Sumonto Ghosh via cfe-dev
cfe-dev at lists.llvm.org
Tue Jan 10 15:21:57 PST 2017
Hi,
I am trying to compile llvm on Windows 10x64 / VS 2015 Express
Steps:
"\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
x86_amd64
set CC=C:\Program Files\LLVM\bin\clang-cl.exe
set CXX=C:\Program Files\LLVM\bin\clang-cl.exe
cmake -G "Ninja" ..\src\ -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DLLVM_ENABLE_ASSERTIONS=True -DLLVM_LIT_ARGS='-v'
-DCMAKE_INSTALL_PREFIX=..\stage2_install -DLLVM_ENABLE_ASSERTIONS=ON
ninja
-------------
Error
C:\llvm\src\tools\clang\tools\c-index-test/libclang_iface.h(113,21):
error: use of undeclared identifier 'strn
dup'
return CUniqueStr(strndup(SR.data(), SR.size()));
^
1 error generated.
Wondering if I am missing any flags?
PS: I did add list(APPEND LLVM_COMPILE_FLAGS
"-fms-compatibility-version=19") to get past 'char16_t' issue.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170110/053069f2/attachment.html>
More information about the cfe-dev
mailing list