【发布时间】:2015-10-05 17:45:43
【问题描述】:
我编写了一个小的 c++ 代码来生成一个 postscript 文件。我已经安装了 ghostscript 查看器。我正在尝试在 cygwin 中打开 .ps 文件,但出现以下错误。
$ 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
谁能建议/帮助我解决这个错误。
【问题讨论】:
-
这里c++有什么相关性?删除了标签。询问时显示 C++ 代码。
-
您好像没有运行 X 服务器。
标签: cygwin ghostscript postscript