我寫了一個小的C++代碼來生成postscript文件。我已經安裝了ghostscript查看器。我想在cygwin中打開.ps文件,但得到了下面的錯誤。在cygwin上運行postscript文件
$ gs.exe fill_rect_chd.ps
GPL Ghostscript 9.15 (2014-09-22)
Copyright (C) 2014 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GPL Ghostscript 9.15: Cannot open X display `(null)'.
**** Unable to open the initial device, quitting.
GPL Ghostscript 9.15: Cannot open X display `(null)'.
Unrecoverable error: ioerror in setpagedevice
Operand stack:
true --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval--
我是新來的postscript。這是出現在.PS代碼文件
$ cat fill_rect_chd.ps
1 0 0 setrgbcolor
0 0 moveto
100 0 lineto
100 100 lineto
0 100 lineto
fill
任何人都可以請建議/幫助我這個錯誤。
這裏[tag:C++]的相關性是什麼?刪除了標籤。詢問時顯示C++代碼。 –
看起來你沒有運行X服務器。 – molbdnilo