我试图在Windows上设置VTK(我说它很复杂吗?^^)。 我已经用CMake成功配置了VTK,我现在正试图通过cygwin运行make。但是,当我进入构建目录并输入make所有终端打印时,确实是:
请
Microsoft Windows [版本6.3.9600]
(c)2013 Microsoft Corporation。保留所有权利。
有谁知道什么是错的?
编辑:输入cygcheck时 我明白了:
Cygwin Package Information
Package Version Status
make 4.0-2 OK
编辑2:这是我得到的截图(对不起,用法语)
提前感谢您提供的任何帮助:)
编辑3:新屏幕截图+ Makefile内容
Makefile内容:
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.2
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
SHELL = cmd.exe
# The CMake executable.
CMAKE_COMMAND = "C:\Program Files (x86)\CMake\bin\cmake.exe"
# The command to remove a file.
RM = "C:\Program Files (x86)\CMake\bin\cmake.exe" -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = C:\Users\Lonni\VTK\VTK-6.2.0
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = C:\Users\Lonni\VTK\Build1
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
"C:\Program Files (x86)\CMake\bin\cmake-gui.exe" -H$(CMAKE_SOURCE_DIR) - B$(CMAKE_BINARY_DIR)
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
"C:\Program Files (x86)\CMake\bin\cmake.exe" -H$(CMAKE_SOURCE_DIR) - B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Lonni\VTK\Build1\CMakeFiles C:\Users\Lonni\VTK\Build1\CMakeFiles\progress.marks
$(MAKE) -f CMakeFiles\Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Lonni\VTK\Build1\CMakeFiles 0
.PHONY : all
# The main clean target
clean:
$(MAKE) -f CMakeFiles\Makefile2 clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
$(MAKE) -f CMakeFiles\Makefile2 preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
$(MAKE) -f CMakeFiles\Makefile2 preinstall
.PHONY : preinstall/fast
# clear depends
depend:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check- build-system CMakeFiles\Makefile.cmake 1
.PHONY : depend
#=============================================================================
# Target rules for targets named vtk-android
# Build rule for target.
vtk-android: cmake_check_build_system
$(MAKE) -f CMakeFiles\Makefile2 vtk-android
.PHONY : vtk-android
# fast build rule for target.
vtk-android/fast:
$(MAKE) -f CMakeFiles\vtk-android.dir\build.make CMakeFiles/vtk- android.dir/build
.PHONY : vtk-android/fast
#=============================================================================
# Target rules for targets named vtk-compile-tools
# Build rule for target.
vtk-compile-tools: cmake_check_build_system
$(MAKE) -f CMakeFiles\Makefile2 vtk-compile-tools
.PHONY : vtk-compile-tools
# fast build rule for target.
vtk-compile-tools/fast:
$(MAKE) -f CMakeFiles\vtk-compile-tools.dir\build.make CMakeFiles/vtk- compile-tools.dir/build
.PHONY : vtk-compile-tools/fast
# Help Target
help:
@echo The following are some of the valid targets for this Makefile:
@echo ... all (the default if no target is provided)
@echo ... clean
@echo ... depend
@echo ... vtk-android
@echo ... edit_cache
@echo ... rebuild_cache
@echo ... vtk-compile-tools
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check- build-system CMakeFiles\Makefile.cmake 0
.PHONY : cmake_check_build_system
答案 0 :(得分:1)
Cygwin的默认安装是quite minimal。它不包括GNU make
,所以你得到了微软的make
。
您需要重新运行Cygwin的setup-*.exe
并添加make
。机会是,你可能也需要其他东西。我建议打开Devel类别,并在你进入时给内容扫描。
编辑:
您的屏幕截图显示了一些混淆。我将逐一介绍它们,引用每种情况下的文字:
Pas deciblespécifiéeetaucun makefilen'aététrouvé
在英语中,即“未指定目标且未找到makefile”。这告诉您GNU make已安装并正在运行,但您当前目录中没有名为GNUmakefile
,makefile
或Makefile
的文件。它按顺序搜索这三个。
这并不奇怪,因为ls
表示您在空目录中运行它。
<强> / cygdrive / C / MinGW的/ bin中/使强>
这里有两个问题:
正如我在评论中所说,只有与cygwin1.dll
相关联的程序才能理解/cygdrive
。 Windows“cmd.exe
不知道/cygdrive
的含义。 c:\MinGW\bin\make
下的cmd.exe
是正确的表单。
MinGW不是Cygwin。你对MinGW的任何问题都是一个完全独立的问题,与你在Cygwin的GNU make包中遇到的问题无关。
<强>的/ usr /斌/使强>
这与前一项类似:cmd.exe
不知道如何处理POSIX路径。因为Windows的文件路径解析代码有时将正斜杠视为与反斜杠相同,所以在这种情况下这会被解释为c:\usr\bin\make
,但几乎肯定没有c:\usr
目录
此路径在左侧屏幕截图中起作用的原因是Cygwin将您的Cygwin安装目录(例如,c:\cygwin
或c:\cygwin64
默认情况下)安装为POSIX根目录,以便c:\cygwin\usr
出现与/usr
链接到使用POSIX API(例如open(2)
)的任何程序cygwin1.dll
。这包括Cygwin版本的GNU bash
,如图所示。
您不应该在Cygwin终端窗口中要求显式路径,因为/usr/bin
应该优先于PATH
中的任何其他内容。如果不是这种情况,您可能没有使用setup.exe
创建的Cygwin图标,在这种情况下您没有正确的登录shell。要么使用该图标,要么通过调用mintty -
来模仿它的作用,而不仅仅是mintty
。