我無法讓 Asymptote 在 Windows 10 下運作

我無法讓 Asymptote 在 Windows 10 下運作

我使用 MetaPost 已有二十多年了。最近我遇到了 Asymptote,它似乎是對 MetaPost 這個奇妙工具的光榮合理化和概括。我真的很想從 MetaPost 遷移到 Asymptote,但我遇到了問題。

我目前的作業系統是 Windows 10 Pro。別問。

我下載了最新的 Windows 版 Asymptote,接受所有預設設置,一切看起來都很好。這是詢問版本的結果。

miktex-asy version 2.67 [(C) 2004 Andy Hammerlindl, John C. Bowman, Tom Prince]

ENABLED OPTIONS:
WebGL    3D HTML rendering
OpenGL   3D OpenGL rendering
CURL     URL support

DISABLED OPTIONS:
GSL      GNU Scientific Library (special functions)
FFTW3    Fast Fourier transforms
XDR      external data representation (portable binary file format)
Readline interactive history and editing
Editline interactive editing (if Readline is unavailable)
Sigsegv  distinguish stack overflows from segmentation faults
GC       Boehm garbage collector

目錄 C:\Program Files\Asymptote 似乎包含所有模組,包括 plain。但是,在包含經典 test.asy 的目錄中鍵入“asy -f PNG test”會導致“無法找到普通模組”。

雖然這似乎沒有必要,但我遵循了WEB 的建議,並將環境變數ASYMPTOTE_DIR 定義為C:\Program Files\Asymptote,這就是結果,對於這個年邁的編譯器編寫者來說,這看起來像是一個編譯錯誤:

Welcome to miktex-asy version 2.67 (to view the manual, type help)
  real value(string s, int i) {return byteinv(hex(substr(s,2i+offset,2)));}
                                      ^
C:/Program Files/Asymptote/plain_pens.asy: 333.39: no matching variable 'byteinv'
  real[][][] S=_schur(a);
               ^
C:/Program Files/Asymptote/plain.asy: 312.16: no matching variable '_schur'
  pair[][][] S=_schur(a);
               ^
C:/Program Files/Asymptote/plain.asy: 326.16: no matching variable '_schur'
error: recursive loading of module 'plain'

有人對我可能做錯了什麼有任何想法嗎?

答案1

我將此求助請求複製到 SourceForge 上的 Asymptote 社區,John Bowman 善意地指出了這個問題。 MikTeX 附帶了一個過時的 asy.exe 副本,它與最新版本的 Asymptote 不相容。由於 Windows 搜尋執行檔的順序,它會先找到舊版本,然後再找到新版本。一種解決方案是重新排序 PATH 路徑,使 Asymptote 位於 MikTeX 之前。我只是將 MikTeX 的 bin 目錄中的 asy.exe 重新命名。問題解決了。 :)

相關內容