larsch / ocra

One-Click Ruby Application Builder
http://ocra.rubyforge.org/
833 stars 84 forks source link

Executable does nothing #184

Open blackruby opened 2 years ago

blackruby commented 2 years ago

I'm using Windos 11 and ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [x64-mingw32] The source file (sample.rb) has only one line:

puts 'Hello world'

When I run the file with the interpreter (ruby .\sample.rb) all is right. Compilation is right too (ocra sample.rb) and sample.exe is generated with no erros, but when I run the generated sample.exe nothing happens (no output) . No errors, no warnings, nothing at all, only the new prompt.

Vucius commented 2 years ago

run executable via command:./sample.exe and,I think that u would see the error

blackruby commented 2 years ago

I run the exe via command line and there's no error message or warning. Of course, not the expected "Hello world" either.

yvesll commented 2 years ago

WIth old versions of ruby like 2.5, I do not need to manually add dlls but when I upgrade to 2.7.5, I also need to append dlls even just a "hello world" project. You can try ocra xxx.rb --dll ruby_builtin_dlls/libssl-1_1-x64.dll --dll ruby_builtin_dlls\libssp-0.dll --dll ruby_builtin_dlls/zlib1.dll --dll ruby_builtin_dlls/libgmp-10.dll If this cannot solve it, maybe you can include all dlls under C:\\bin\ruby_builtin_dlls.