Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Compilation Error on Linux #37

@EvergreenTheTree

Description

@EvergreenTheTree

I am on Arch Linux and the version of Julia I'm using is 1.8.5.

When running the install_ahorn.jl script I get the following compilation errror:

ERROR: LoadError: ccall method definition: return type doesn't correspond to a C type
Stacktrace:
 [1] top-level scope
   @ ~/.julia/packages/Ahorn/hlYON/src/helpers/gtk_helpers.jl:145
 [2] include(x::String)
   @ Ahorn ~/.julia/packages/Ahorn/hlYON/src/Ahorn.jl:2
 [3] top-level scope
   @ ~/.julia/packages/Ahorn/hlYON/src/Ahorn.jl:27
in expression starting at /home/green/.julia/packages/Ahorn/hlYON/src/helpers/gtk_helpers.jl:145
in expression starting at /home/green/.julia/packages/Ahorn/hlYON/src/Ahorn.jl:2
in expression starting at /home/green/programs/Ahorn/install_ahorn.jl:68

After a little bit of work, it appears that this patch to src/helpers/gtk_helpers.jl fixed the issue:

diff --git a/src/helpers/gtk_helpers.jl b/src/helpers/gtk_helpers.jl
index 8db84e45474d..ede054380876 100644
--- a/src/helpers/gtk_helpers.jl
+++ b/src/helpers/gtk_helpers.jl
@@ -143,7 +143,7 @@ end
 # General
 
 function setDefaultDirection(direction::Integer)
-    return ccall((:gtk_widget_set_default_direction, Gtk.libgtk), Ptr{}, (Cint,), direction)
+    return ccall((:gtk_widget_set_default_direction, Gtk.libgtk), Ptr{Cvoid}, (Cint,), direction)
 end
 
 function initComboBox!(widget::Gtk.GtkComboBoxText, choices::Array{String, 1})

I am not at all familiar with Julia and was not sure if this would break things for other people, so I thought that it would be best to share it as an issue instead of a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions