Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add windows swig to setlocale #488

Merged
merged 1 commit into from
May 10, 2020
Merged

Conversation

Hamayama
Copy link
Collaborator

  • Windows 上で Lem を起動すると、以下の WARNING が出るようになったため、
    対応しました。

    WARNING: DBG_PRINTEXCEPTION_C: Invalid parameter passed to C runtime function.
    
  • WARNING の発生箇所は、frontends/ncurses/term.lisp の term-init 関数内の
    (lem-setlocale/cffi:setlocale lem-setlocale/cffi:+lc-all+ "")
    のところでした。
    ( lem-setlocale/cffi:+lc-all+ の値が、Linux では 6 で、MinGW では 0 になるようです)

  • このため、MSYS2/MinGW-w64 (64bit) 環境で、SWIG を回して対応しました。

<以下は SWIG のメモ>

  • SWIG 4 は Lisp (CFFI) に非対応とのことで、SWIG 3.0.12 をインストールする。
    ( Status of target languages for SWIG 4 swig/swig#1437 )

    http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-swig-3.0.12-1-any.pkg.tar.xz
    をダウンロードして、以下を実行。
    pacman -U mingw-w64-x86_64-swig-3.0.12-1-any.pkg.tar.xz
    
  • そして、以下のように実行する。

    cd /c/work/lem/lib/setlocale/swig
    ros run
    (ql:quickload :lake)
    (lake:lake)
    
  • これで、cffi.lisp ができるので、cffi_windows.lisp にリネームし、
    先頭に以下の2行を挿入し、1個上のフォルダに移動する。

    (uiop/package:define-package :lem-setlocale/cffi (:use :cl))
    (in-package :lem-setlocale/cffi)
    

@cxxxr cxxxr merged commit 97818c8 into lem-project:master May 10, 2020
@cxxxr
Copy link
Member

cxxxr commented May 10, 2020

ありがとうございます

@Hamayama Hamayama deleted the setlocale branch June 24, 2020 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants