Monday, March 9, 2015

Using gvim under Cygwin

Today I am trying to using gvim under Cygwin console but it failed:
$ which vim
/usr/bin/vim

$ which gvim
/usr/bin/gvim

$ gvim
E233: <δΈθƒ½ι–‹ε•Ÿ X Server DISPLAY>
Press ENTER or type command to continue

From below link we know I have to install X-Server to Cygwin:
http://stackoverflow.com/questions/12430633/how-can-i-get-mintty-cygwin-terminal-to-open-gvim-in-a-new-window

Here are how to install and enable X-Server under Cygwin:
[Official site]
http://x.cygwin.com/

[Installing Cygwin/X]
A listing of the Cygwin/X packages is given below; a listing of the general Cygwin packages would be beyond the scope of this document.
Cygwin/X packages are located in the X11 category.
  • xorg-server (required, the Cygwin/X X Server)
  • xinit (required, scripts for starting the X server: xinitstartxstartwin (and a shortcut on the Start Menu to run it), startxdmcp.bat )
  • xorg-docs (optional, man pages)
  • xlaunch (optional, a wizard for starting X sessions)
  • You may also select any X client programs you want to use, and any fonts you would like to have available.
  • You may also want to ensure that the openssh package is selected if you wish to use ssh connections to run remote X clients.
  • You may also want to ensure that the inetutils or rsh packages are selected if you wish to use telnet or rsh connections to run remote X clients. (not recommended)
[Starting Cygwin/X]
$ startxwin

Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.17.1.0
OS: CYGWIN_NT-6.1 TW1W7D-400077 1.7.35(0.287/5/3) 2015-03-04 12:09 x86_64
OS: Windows 7 Service Pack 1 [Windows NT 6.1 build 7601] (Win64)
Package: version 1.17.1-2 built 2015-02-23

XWin was started with the following command line:

/usr/bin/XWin :0 -multiwindow -auth /home/linst/.serverauth.7912

(II) xorg.conf is not supported
(II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
LoadPreferences: /home/linst/.XWinrc not found
LoadPreferences: Loading /etc/X11/system.XWinrc
LoadPreferences: Done parsing the configuration file...
winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL
winDetectSupportedEngines - Returning, supported engines 00000005
winSetEngine - Multi Window or Rootless => ShadowGDI
winScreenInit - Using Windows display depth of 32 bits per pixel
winAllocateFBShadowGDI - Creating DIB with width: 3520 height: 1080 depth: 32
winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32
MIT-SHM extension disabled due to lack of kernel support
XFree86-Bigfont extension local-client optimization disabled due to lack of shared memory support in the kernel
glWinSelectGLimplementation: Loaded 'cygnativeGLthunk.dll'
(II) AIGLX: Testing pixelFormatIndex 5
GL_VERSION:     4.5.0 NVIDIA 347.25
GL_VENDOR:      NVIDIA Corporation
GL_RENDERER:    GeForce GT 640/PCIe/SSE2
(II) AIGLX: enabled GLX_SGI_make_current_read
(II) AIGLX: enabled GLX_MESA_copy_sub_buffer
(II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
(II) AIGLX: enabled GLX_SGIX_pbuffer
(II) AIGLX: enabled GLX_ARB_multisample and GLX_SGIS_multisample
(II) 482 pixel formats reported by wglGetPixelFormatAttribivARB
(II) AIGLX: Set GLX version to 1.4
(II) 323 fbConfigs
(II) ignored pixel formats: 0 not OpenGL, 54 RBGA float, 69 RGBA unsigned float, 0 unknown pixel type, 36 unaccelerated
(II) GLX: Initialized Win32 native WGL GL provider for screen 0
winPointerWarpCursor - Discarding first warp: 1760 540
(--) 8 mouse buttons found
(--) Setting autorepeat to delay=500, rate=31
(--) Windows keyboard layout: "00000409" (00000409) "US", type 4
(--) Found matching XKB configuration "English (USA)"
(--) Model = "pc105" Layout = "us" Variant = "none" Options = "none"
Rules = "base" Model = "pc105" Layout = "us" Variant = "none" Options = "none"
winInitMultiWindowWM - DISPLAY=:0.0
winMultiWindowXMsgProc - DISPLAY=:0.0
winProcEstablishConnection - winInitClipboard returned.
winClipboardThreadProc - DISPLAY=:0.0
OS maintains clipboard viewer chain: yes
winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display.
winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display.
winClipboardProc - XOpenDisplay () returned and successfully opened the display.
winMultiWindowXMsgProcErrorHandler - ERROR: BadMatch (invalid parameter attributes)

After that, a new window will opened, you can now start gvim($ gvim) correctly!

[Switching out of Cygwin/X]
[Stopping Cygwin/X]

Qt 5.4 CMake Manual

This manual details the specifics of how to use Qt 5 with CMake. The minimum version required to use Qt5 is CMake 2.8.3, but 2.8.11 is recommended.

http://doc.qt.io/qt-5/cmake-manual.html