ocra icon indicating copy to clipboard operation
ocra copied to clipboard

Code execution cannot proceed because dll was not found

Open AndyObtiva opened this issue 2 years ago • 4 comments

Hi,

I tried OCRA in Windows 10 (10.l0.19043 Build 19043) with Ruby 3.0.2 (including MSYS2 & MINGW Toolchains)

The code in sample.rb is the following:

puts 'Hello, World!'

When I run ocra sample.rb from the Command Prompt, I get the following output:

ocra-output

However, when I run sample.exe, I get the following 3 errors (despite not having any gem or dll dependencies in my Ruby sample.rb script):

ocra-error1

ocra-error2

ocra-error3

I tried re-running ocra sample.rb from Git Bash, but it does not even work all the way from there.

Help is appreciated.

AndyObtiva avatar Mar 28 '22 13:03 AndyObtiva

Same issue. see https://github.com/larsch/ocra/issues/168

yvesll avatar Apr 21 '22 06:04 yvesll

You can manually include the dlls with --dll ruby_builtin_dlls\<dll>, as tacky of a solution as that is.

I have a feeling that ocra is unmaintained and this bug is going to go unfixed. I'd be willing to maintain it, but unfortunately I have too much on my plate at the moment.

Speak2Erase avatar May 18 '22 05:05 Speak2Erase

@AndyObtiva You may want to try switching to Ruby version 2.6.5 or an older version. Personally, I have become accustomed to packaging .rb files into .exe files using this version.

Hope this helps.

Vucius avatar Apr 21 '23 16:04 Vucius

@AndyObtiva You can try my fork ocran, which solves those problems.

Largo avatar May 17 '23 11:05 Largo