簡體   English   中英

用Cygwin做

[英]make with Cygwin

我試圖在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

Cygwin的默認安裝非常少 它不包括GNU make ,因此您正在獲取Microsoft的make

您需要重新運行Cygwin的setup-*.exe並添加make 您可能還需要其他東西。 我建議打開“開發”類別,然后在其中瀏覽內容。


編輯 ,將截圖添加到問題后:

您的屏幕截圖顯示了一些困惑。 我將逐一介紹它們,並分別引用文本:

年鑒和檔案制作文件

用英語表示,即“未指定目標,也未找到任何makefile”。 這告訴您已安裝並正在運行GNU make,但是當前目錄中沒有名為GNUmakefilemakefileMakefile的文件。 它按順序搜索這三個。

這並不奇怪,因為ls表明您正在一個空目錄中運行它。

/ cygdrive / C / MinGW的/ bin中/讓

這里有兩個問題:

  1. 正如我在評論中所說,只有鏈接到cygwin1.dll程序才能理解/cygdrive Windows的cmd.exe不知道/cygdrive是什么意思。 c:\\MinGW\\bin\\makecmd.exe下的正確格式。

  2. MinGW不是Cygwin。 MinGW遇到的任何問題都是完全獨立的問題,與Cygwin的GNU make軟件包所遇到的問題無關。

在/ usr / bin中/讓

這類似於上一項: cmd.exe不知道如何處理POSIX路徑。 由於Windows的文件路徑解析代碼有時會將正斜杠與反斜杠相同,因此在這種情況下,它被解釋為c:\\usr\\bin\\make ,但是幾乎可以肯定沒有c:\\usr\u003c/code>目錄。

此路徑在左側屏幕截圖中起作用的原因是Cygwin將您的Cygwin安裝目錄(例如,默認為c:\\cygwinc:\\cygwin64 )作為POSIX根目錄c:\\cygwin64 ,因此c:\\cygwin\\usr\u003c/code>顯示為/usr鏈接到cygwin1.dll任何使用POSIX API的程序,例如open(2) 如您所示,其中包括Cygwin的GNU bash版本。

您不應該在Cygwin終端窗口中需要顯式路徑,因為/usr/bin應該在PATH其他任何位置之前。 如果不是這種情況,則可能沒有使用setup.exe創建的Cygwin圖標,在這種情況下,您沒有正確的登錄外殼。 要么使用該圖標,要么通過調用mintty -模仿其功能mintty -不僅是普通的mintty

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM