我尝试根据this指令使用gvim
构建MinGW
和@echo off
REM Run this batch file from any directory to build gvim.exe and vim.exe.
REM But first edit the paths and Python version number.
REM --- Specify Vim /src folder ---
set VIMSRC=C:\Downloads\vim\src
REM --- Add MinGW /bin directory to PATH ---
PATH = C:\MinGW\bin;%PATH%
REM --- Also make sure that PYTHON, PYTHON_VER below are correct. ---
REM get location of this batch file
set WORKDIR=%~dp0
set LOGFILE=%WORKDIR%log.txt
echo Work directory: %WORKDIR%
echo Vim source directory: %VIMSRC%
REM change to Vim /src folder
cd /d %VIMSRC%
REM --- Build GUI version (gvim.exe) ---
echo Building gvim.exe ...
REM The following command will compile with both Python 2.7 and Python 3.3
mingw32-make.exe -f Make_ming.mak PYTHON="C:/Python27" PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON3="C:/Python35" PYTHON3_VER=35 DYNAMIC_PYTHON3=yes FEATURES=HUGE GUI=yes gvim.exe > "%LOGFILE%"
REM --- Build console version (vim.exe) ---
echo Building vim.exe ...
REM The following command will compile with both Python 2.7 and Python 3.3
mingw32-make.exe -f Make_ming.mak PYTHON="C:/Python27" PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON3="C:/Python35" PYTHON3_VER=35 DYNAMIC_PYTHON3=yes FEATURES=HUGE GUI=no vim.exe >> "%LOGFILE%"
echo Moving files ...
move gvim.exe "%WORKDIR%"
move vim.exe "%WORKDIR%"
echo Cleaning Vim source directory ...
REM NOTE: "mingw32-make.exe -f Make_ming.mak clean" does not finish the job
IF NOT %CD%==%VIMSRC% GOTO THEEND
IF NOT EXIST vim.h GOTO THEEND
IF EXIST pathdef.c DEL pathdef.c
IF EXIST obj\NUL RMDIR /S /Q obj
IF EXIST obji386\NUL RMDIR /S /Q obji386
IF EXIST gobj\NUL RMDIR /S /Q gobj
IF EXIST gobji386\NUL RMDIR /S /Q gobji386
IF EXIST gvim.exe DEL gvim.exe
IF EXIST vim.exe DEL vim.exe
:THEEND
pause
。为方便起见,我将它们发布在这里
Building gvim.exe ...
diff.c: In function 'ex_diffpatch':
diff.c:891:12: error: storage size of 'st' isn't known
stat_T st;
^
diff.c:891:12: warning: unused variable 'st' [-Wunused-variable]
mingw32-make.exe: *** [gobjx86-64/diff.o] Error 1
Building vim.exe ...
diff.c: In function 'ex_diffpatch':
diff.c:891:12: error: storage size of 'st' isn't known
stat_T st;
^
diff.c:891:12: warning: unused variable 'st' [-Wunused-variable]
mingw32-make.exe: *** [objx86-64/diff.o] Error 1
我在构建过程中遇到以下错误:
{{1}}
有谁知道可能是什么问题?
答案 0 :(得分:1)
我弄清楚问题是什么。我使用的是32位MinGW
而不是64位系统的MinGW-w64
。换句话说,我需要从https://mingw-w64.org/doku.php下载MinGW
,而不是从http://www.mingw.org/下载class ViewController: UIViewController,UISearchControllerDelegate, UISearchResultsUpdating, UISearchBarDelegate {
var resultSearchController : UISearchController!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
self.resultSearchController = UISearchController(searchResultsController: nil)
self.resultSearchController.searchResultsUpdater = self
self.resultSearchController.delegate = self
self.resultSearchController.searchBar.delegate = self
self.resultSearchController.hidesNavigationBarDuringPresentation = false
self.resultSearchController.dimsBackgroundDuringPresentation = true
self.definesPresentationContext = true
self.navigationItem.titleView = resultSearchController.searchBar
navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Your Button", style: .plain, target: self, action: #selector(addTapped))
}
func updateSearchResults(for searchController: UISearchController) {
// You have to implement search delegate method here to make it work.
if resultSearchController.isActive == true {
self.navigationItem.rightBarButtonItem = nil
} else {
navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Your Button", style: .plain, target: self, action: #selector(addTapped))
}
}
func addTapped() {
// You can do your stuff here. when your button pressed...
print("Button Pressed")
}
}
。
答案 1 :(得分:0)
我不知道这个问题是什么;但如果我是你,我会跟着the instructions by Antoine Mechelynck,这是非常详细的。我已经使用他的指南来构建Unix / Linux指南,它们非常好。
如果构建它仍然有问题,可以考虑从vim.org下载二进制文件。还有一个portable version (from PortableApps),它不需要安装甚至从USB记忆棒运行的权限。