2

I'm trying to get a piece of code running on a raspberry pi model 4b that I believe was previously running of a server running Debian10 (although now I am not so sure). The code errors at this line

libad4 = ctypes.cdll.LoadLibrary('libad4.dll')

With this the error reads invalid ELF header and I understood this to be an issue due to the dll format being windows specific so I changed the code to

libad4 = ctypes.cdll.LoadLibrary('libad4.so')

And the error changes to "no such file or directory". Both these files (.dll and .so) exist in the folder I was running the code from and I get the same error if I just try to load the dll outside the program. I am trying to load the files here https://www.bmcm.de/libad-en.html and I cannot tell if there may be an issue due to the ARM processor on the pi. Can anyone tell me if it would be possible to run this code on the pi and if not if there is a solution?

2
  • Perhaps the libraries are targeted for an Intel type CPU rather than the ARM CPU in the Pi. You need to ask the vendor.
    – joan
    Jan 13 at 16:45
  • The Linux file command will tell you the type of a file based on its contents. Intel-based Linux system .so files will report like "ELF 64-bit LSB shared object, x86-64,", RPi4 will report like "ELF 32-bit LSB shared object, ARM, EABI5 version 1". Windows .dll libraries are reported like "PE32+ executable (DLL) (GUI) x86-64". Jan 21 at 3:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.