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

Compilation Error on Linux #37

Open
EvergreenTheTree opened this issue Feb 12, 2023 · 0 comments
Open

Compilation Error on Linux #37

EvergreenTheTree opened this issue Feb 12, 2023 · 0 comments

Comments

@EvergreenTheTree
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant