Shared library

Started by wombats, December 10, 2023, 00:09:54

Previous topic - Next topic

wombats

When trying to use a DLL created in BlitzMax NG, I get this error: _ZSt28__throw_bad_array_new_lengthv could not be located in the dynamic link library

I'm calling InitBRL before trying to use any of my DLL functions. Does anyone know what's wrong?

Edit: I downloaded the latest pre-release and it's working now.

wombats

I can only get x64 DLLs to work. x86 DLLs fail to load (I am trying to load them in x86 BlitzMax NG).

Are x86 DLLs supported?

Henri

Hi,

did 32-bit DLL:s work before ?

I haven't created DLL:s in Blitzmax, so I know only what is written in the docs. Export might need additional "Win32" for 32-bit, but I'm not sure if this is an issue.

https://blitzmax.org/docs/en/language/creating_dlls/

-Henri
- Got 01100011 problems, but the bit ain't 00000001

wombats

Hi,

Thanks for your reply.

This is the first time I'm trying. 'Shared library' isn't disabled when enabling 'x86', but I don't know if it's supposed to.

I've tried using "Win32" and not. It doesn't make seem to make a difference. The DLL still fails to load in x86.

Henri

Are you using your created DLL in Blitzmax with LoadLibrary ? 

-Henri
- Got 01100011 problems, but the bit ain't 00000001

wombats

Yes. Interestingly, it seems to be working now with BlitzMax NG x86. However, PureBasic x86 refuses to load the DLL.