jhass / crystal-gobject

gobject-introspection for Crystal
BSD 3-Clause "New" or "Revised" License
127 stars 13 forks source link

Freebsd, sample hello world fails. #41

Closed devosalain closed 4 years ago

devosalain commented 4 years ago

crystal run samples/gtk_hello_world.cr returns : Syntax error in lib/gobject/g_i_repository/info/base_info.cr:115: unexpected token: : def dump(dumper, & : BaseInfo ->) I

jhass commented 4 years ago

Which Crystal version is that? :) I suspect something older than 0.31

devosalain commented 4 years ago

Indeed, Crystal 0.28.0 (2020-02-07)

jhass commented 4 years ago

So yeah, current minium is 0.31, sorry :)

devosalain commented 4 years ago

I installed Crystal 0.32.1 (2020-01-31) LLVM: 9.0.1 Default target: x86_64-portbld-freebsd12.1 Now it works. Just startup time of a gui application can sometimes take a few seconds.

jhass commented 4 years ago

You're probably seeing the compilation time, it generates a lot of code in the background :) especially on a cold cache that takes a while. If you run crystal build on a file, the resulting binary should boot a lot faster.

devosalain commented 4 years ago

For faster startup time now i compile with the options : crystal build --verbose -s -p -t --mcpu ivybridge --release --no-debug --link-flags "-L$(pwd)"