Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 2012 使用VisualStudio构建LLVM_Visual Studio 2012_Cmake_Llvm - Fatal编程技术网

Visual studio 2012 使用VisualStudio构建LLVM

Visual studio 2012 使用VisualStudio构建LLVM,visual-studio-2012,cmake,llvm,Visual Studio 2012,Cmake,Llvm,我正在尝试使用visual studio 2012(版本10.0)构建LLVM。我已安装CMake并已运行以下命令: svn公司 cd llvm\工具 svn公司 cd mkdir构建 光盘制作 cmake-G“Visual Studio 10”。\llvm 运行这些命令可以正常工作,直到最后一步。我收到大量警告(?),如下所示: -- Looking for dirent.h -- Looking for dirent.h - not found -- Looking for dlfcn.h

我正在尝试使用visual studio 2012(版本10.0)构建LLVM。我已安装CMake并已运行以下命令:

  • svn公司
  • cd llvm\工具
  • svn公司
  • cd
  • mkdir构建
  • 光盘制作
  • cmake-G“Visual Studio 10”。\llvm
  • 运行这些命令可以正常工作,直到最后一步。我收到大量警告(?),如下所示:

    -- Looking for dirent.h
    -- Looking for dirent.h - not found
    -- Looking for dlfcn.h
    -- Looking for dlfcn.h - not found
    -- Looking for errno.h
    -- Looking for errno.h - found
    -- Looking for execinfo.h
    -- Looking for execinfo.h - not found
    -- Looking for fcntl.h
    -- Looking for fcntl.h - found
    -- Looking for inttypes.h
    -- Looking for inttypes.h - not found
    -- Looking for limits.h
    -- Looking for limits.h - found
    -- Looking for link.h
    -- Looking for link.h - not found
    -- Looking for malloc.h
    -- Looking for malloc.h - found
    -- Looking for malloc/malloc.h
    -- Looking for malloc/malloc.h - not found
    -- Looking for ndir.h
    -- Looking for ndir.h - not found
    -- Looking for signal.h
    -- Looking for signal.h - found
    -- Looking for stdint.h
    -- Looking for stdint.h - found
    -- Looking for sys/dir.h
    -- Looking for sys/dir.h - not found
    -- Looking for sys/ioctl.h
    -- Looking for sys/ioctl.h - not found
    -- Looking for sys/mman.h
    -- Looking for sys/mman.h - not found
    -- Looking for sys/ndir.h
    -- Looking for sys/ndir.h - not found
    -- Looking for sys/param.h
    -- Looking for sys/param.h - not found
    -- Looking for sys/resource.h
    -- Looking for sys/resource.h - not found
    -- Looking for sys/stat.h
    -- Looking for sys/stat.h - found
    -- Looking for sys/time.h
    -- Looking for sys/time.h - not found
    -- Looking for sys/uio.h
    -- Looking for sys/uio.h - not found
    -- Looking for sys/wait.h
    -- Looking for sys/wait.h - not found
    -- Looking for termios.h
    -- Looking for termios.h - not found
    -- Looking for unistd.h
    -- Looking for unistd.h - not found
    -- Looking for utime.h
    -- Looking for utime.h - not found
    -- Looking for valgrind/valgrind.h
    -- Looking for valgrind/valgrind.h - not found
    -- Looking for zlib.h
    -- Looking for zlib.h - not found
    -- Looking for fenv.h
    -- Looking for fenv.h - not found
    -- Looking for FE_ALL_EXCEPT
    -- Looking for FE_ALL_EXCEPT - not found
    -- Looking for FE_INEXACT
    -- Looking for FE_INEXACT - not found
    -- Looking for mach/mach.h
    -- Looking for mach/mach.h - not found
    -- Looking for mach-o/dyld.h
    -- Looking for mach-o/dyld.h - not found
    -- Performing Test HAVE_CXXABI_H
    -- Performing Test HAVE_CXXABI_H - Failed
    -- Looking for arc4random
    -- Looking for arc4random - not found
    -- Looking for backtrace
    -- Looking for backtrace - not found
    -- Looking for getpagesize
    -- Looking for getpagesize - not found
    -- Looking for getrusage
    -- Looking for getrusage - not found
    -- Looking for setrlimit
    -- Looking for setrlimit - not found
    -- Looking for isatty
    -- Looking for isatty - not found
    -- Looking for isinf
    -- Looking for isinf - not found
    -- Looking for isinf
    -- Looking for isinf - not found
    -- Looking for finite
    -- Looking for finite - not found
    -- Looking for isnan
    -- Looking for isnan - not found
    -- Looking for isnan
    -- Looking for isnan - not found
    -- Looking for ceilf
    -- Looking for ceilf - found
    -- Looking for floorf
    -- Looking for floorf - found
    -- Looking for fmodf
    -- Looking for fmodf - found
    -- Looking for log
    -- Looking for log - found
    -- Looking for log2
    -- Looking for log2 - not found
    -- Looking for log10
    -- Looking for log10 - found
    -- Looking for exp
    -- Looking for exp - found
    -- Looking for exp2
    -- Looking for exp2 - not found
    -- Looking for exp10
    -- Looking for exp10 - not found
    -- Looking for futimens
    -- Looking for futimens - not found
    -- Looking for futimes
    -- Looking for futimes - not found
    -- Looking for nearbyintf
    -- Looking for nearbyintf - not found
    -- Looking for mallinfo
    -- Looking for mallinfo - not found
    -- Looking for malloc_zone_statistics
    -- Looking for malloc_zone_statistics - not found
    -- Looking for mkdtemp
    -- Looking for mkdtemp - not found
    -- Looking for mkstemp
    -- Looking for mkstemp - not found
    -- Looking for mktemp
    -- Looking for mktemp - not found
    -- Looking for closedir
    -- Looking for closedir - not found
    -- Looking for opendir
    -- Looking for opendir - not found
    -- Looking for readdir
    -- Looking for readdir - not found
    -- Looking for getcwd
    -- Looking for getcwd - not found
    -- Looking for gettimeofday
    -- Looking for gettimeofday - not found
    -- Looking for getrlimit
    -- Looking for getrlimit - not found
    -- Looking for posix_spawn
    -- Looking for posix_spawn - not found
    -- Looking for pread
    -- Looking for pread - not found
    -- Looking for realpath
    -- Looking for realpath - not found
    -- Looking for sbrk
    -- Looking for sbrk - not found
    -- Looking for srand48
    -- Looking for srand48 - not found
    -- Looking for strtoll
    -- Looking for strtoll - not found
    -- Looking for strtoq
    -- Looking for strtoq - not found
    -- Looking for strerror
    -- Looking for strerror - found
    -- Looking for strerror_r
    -- Looking for strerror_r - not found
    -- Looking for strerror_s
    -- Looking for strerror_s - found
    -- Looking for setenv
    -- Looking for setenv - not found
    -- Looking for _chsize_s
    -- Looking for _chsize_s - found
    -- Looking for _alloca
    -- Looking for _alloca - not found
    -- Looking for __alloca
    -- Looking for __alloca - not found
    -- Looking for __chkstk
    -- Looking for __chkstk - not found
    -- Looking for ___chkstk
    -- Looking for ___chkstk - not found
    -- Looking for __ashldi3
    -- Looking for __ashldi3 - not found
    -- Looking for __ashrdi3
    -- Looking for __ashrdi3 - not found
    -- Looking for __divdi3
    -- Looking for __divdi3 - not found
    -- Looking for __fixdfdi
    -- Looking for __fixdfdi - not found
    -- Looking for __fixsfdi
    -- Looking for __fixsfdi - not found
    -- Looking for __floatdidf
    -- Looking for __floatdidf - not found
    -- Looking for __lshrdi3
    -- Looking for __lshrdi3 - not found
    -- Looking for __moddi3
    -- Looking for __moddi3 - not found
    -- Looking for __udivdi3
    -- Looking for __udivdi3 - not found
    -- Looking for __umoddi3
    -- Looking for __umoddi3 - not found
    -- Looking for __main
    -- Looking for __main - not found
    -- Looking for __cmpdi2
    -- Looking for __cmpdi2 - not found
    -- Looking for __GLIBC__
    -- Looking for __GLIBC__ - not found
    -- Performing Test HAVE_INT64_T
    -- Performing Test HAVE_INT64_T - Success
    -- Performing Test HAVE_UINT64_T
    -- Performing Test HAVE_UINT64_T - Success
    -- Performing Test HAVE_U_INT64_T
    -- Performing Test HAVE_U_INT64_T - Failed
    -- Looking for __atomic_fetch_add_4 in atomic
    -- Looking for __atomic_fetch_add_4 in atomic - not found
    -- Performing Test LLVM_HAS_ATOMICS
    -- Performing Test LLVM_HAS_ATOMICS - Success
    -- Performing Test SUPPORTS_NO_VARIADIC_MACROS_FLAG
    -- Performing Test SUPPORTS_NO_VARIADIC_MACROS_FLAG - Failed
    -- Target triple: i686-pc-win32
    -- Native target architecture is X86
    -- Looking for _strtoi64
    -- Looking for _strtoi64 - found
    -- Performing Test HAVE_ELMCB_PCSTR
    -- Performing Test HAVE_ELMCB_PCSTR - Success
    -- Threads enabled.
    -- Doxygen disabled.
    -- Sphinx disabled.
    -- Go bindings disabled.
    CMake Error at cmake/modules/HandleLLVMOptions.cmake:41 (message):
      Host Visual Studio must be at least 2012 (MSVC 17.0)
    Call Stack (most recent call first):
      CMakeLists.txt:318 (include)
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/Scratch/Clang/build/CMakeFiles/CMakeOutput.log".
    See also "C:/Scratch/Clang/build/CMakeFiles/CMakeError.log".
    
    这些文件位于我的系统中的C:\Program files(x86)\Microsoft Visual Studio 10.0\VC\include下。该命令已完成,但尚未生成文档告诉我应该创建的LLVM.sln文件


    有人能告诉我如何纠正我遇到的问题吗?我非常感谢您提供的任何指导。

    您需要让Visual Studio走上您的道路。有一个批处理文件
    vcvars32.bat
    (对于32位编译)或
    vcvars64.bat
    (对于64位编译),在调用CMake之前,必须从命令行运行。设置所有路径和其他环境变量,使编译器“可见”

    在您的系统上,它们处于

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat
    


    cmake visual studio 10驱动程序适用于visual studio 2010


    LLVM和clang需要一个能够完成大多数c++11任务的编译器

    “VisualStudio10”不是“VisualStudio2010”而是“2012”吗?2012年应该是11年,2013年应该是12年。我还认为LLVM现在确实需要VS2012或VS2013。他们非常积极地升级到新版本,因为他们真的想使用C++11/C++14功能,而VS支持是阻碍他们的主要因素。@bames53是的,这是我问题的一部分。在Linux上花了太多时间:)谢谢librik,我现在正在运行脚本,仍然得到一些丢失的文件,但它们是POSIX文件,没有在必备条件中列出。看起来问题可能是重新配置,这意味着我的目标是错误的Visual Studio版本,脚本更正了该版本。看来这次成功了,我会尝试构建项目,一旦我完成了,他们会更新你。谢谢,伙计,这修正了我的工具链,让事情正常进行。你如何运行批处理文件?我遇到了同样的问题。启动一个命令提示符,使用CD导航到安装批处理文件的目录(取决于您的Visual Studio版本,10.0表示VS2010),然后使用VS2013在Im中键入“vcvars32.bat”或“vcvars64.bat”确定,然后按照您的回答和注释进行操作,但似乎什么都不起作用。我导航到C:\Program Files(x86)\Microsoft Visual Studio 12.0\VC\bin\x86\u amd64,在命令提示符下运行vcvarsamd64\u x86.bat,将目标设置为Visual Studio 12 Win64,并在CMake中使用本机默认值,但得到了相同的结果。可能是我在某个地方的台阶上俯瞰?
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\vcvars64.bat