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

Compiling on Windows 10 is not working #67

Open
douglasmaieski opened this issue Sep 17, 2024 · 2 comments
Open

Compiling on Windows 10 is not working #67

douglasmaieski opened this issue Sep 17, 2024 · 2 comments

Comments

@douglasmaieski
Copy link

Hi,

I'm trying to compile an app in Windows 10, but it's not working. It works on Ubuntu using the same SBCL version.

PS C:\Users\dougl\Projects\simple-window> ./simple-window.exe

** (process:2352): CRITICAL **: 19:56:34.461: g_irepository_find_by_name: assertion 'typelib != NULL' failed
WARNING: No such FFI name Application
Unhandled SB-PCL::NO-APPLICABLE-METHOD-ERROR in thread #<SB-THREAD:THREAD tid=13320 "main thread" RUNNING
                                                          {1101860003}>:
  There is no applicable method for the generic function
    #<STANDARD-GENERIC-FUNCTION GIR::NSGET (6)>
  when called with arguments
    (NIL GTK4::NEW).
See also:
  The ANSI Standard, Section 7.6.6

Backtrace for: #<SB-THREAD:THREAD tid=13320 "main thread" RUNNING {1101860003}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<SB-PCL::NO-APPLICABLE-METHOD-ERROR {110187EFC3}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* #<SB-PCL::NO-APPLICABLE-METHOD-ERROR {110187EFC3}>)
2: (INVOKE-DEBUGGER #<SB-PCL::NO-APPLICABLE-METHOD-ERROR {110187EFC3}>)
3: (ERROR SB-PCL::NO-APPLICABLE-METHOD-ERROR :GENERIC-FUNCTION #<STANDARD-GENERIC-FUNCTION GIR::NSGET (6)> :ARGS (NIL GTK4::NEW))
4: ((:METHOD NO-APPLICABLE-METHOD (T)) #<STANDARD-GENERIC-FUNCTION GIR::NSGET (6)> NIL GTK4::NEW) [fast-method]
5: (SB-PCL::CALL-NO-APPLICABLE-METHOD #<STANDARD-GENERIC-FUNCTION GIR::NSGET (6)> (NIL GTK4::NEW))
6: (GIR:NGET #<unavailable argument> "Application" GTK4::NEW)
7: (GTK4:MAKE-APPLICATION :APPLICATION-ID "com.simple-window.app" :FLAGS 0)
8: (COM.SIMPLE-WINDOW.APP.MAIN NIL)
9: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
10: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
11: (SB-IMPL::%START-LISP)
12: ("foreign function: #x140045AB5")
13: ("foreign function: #x14000A0A0")

unhandled condition in --disable-debugger mode, quitting
(asdf:defsystem "simple-window"
  :serial t
  :depends-on (#:cl-gtk4)
  :components ((:file "main")))
(gtk4:define-application
  (:name simple-window :id "com.simple-window.app")
  (gtk4:define-main-window
    (window (gtk4:make-application-window :application gtk4:*application*))

    (setf (gtk4:window-transient-for window) nil)
    (setf (gtk4:window-title window) "Simple window")
    (setf (gtk4:window-default-size window) '(1000 600))

    (gtk4:window-present window)))

(defun start ()
  (simple-window))
(load "~/quicklisp/setup.lisp")

(require 'asdf)
(push *DEFAULT-PATHNAME-DEFAULTS* asdf:*central-registry*)
(asdf:load-system "simple-window")

(sb-ext:save-lisp-and-die "simple-window.exe"
                          :toplevel #'start
                          :executable t)
@douglasmaieski
Copy link
Author

Actually it's also not working on Ubuntu

@bohonghuang
Copy link
Owner

Please avoid using save-lisp-and-die for ASDF-based systems. Create a system that depends on cl-gtk4 and use asdf:make to build it instead.

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

No branches or pull requests

2 participants