libsodium on LiveCode?

Monte Goulding monte at appisle.net
Mon Feb 19 18:02:07 EST 2018


Hi Brian

Looks like there’s an issues in the code folder stuff. At the moment it will look for `code\x86-win` when deploying a standalone it seems. I will patch it in a bit to `code\x86-win32`. By the looks of the IDE extension loading code it will be actually work for win or win32 (it does a filter with `*-win*` on the folders) at the moment so this is unlikely to be your problem.

For 64 bit it would be `code\x86_64-win32` however that’s only for the FileMaker plugin at the moment so also unlikely to be your problem.

So… just to confirm. Your dll is called libsodium-23.dll and is built for x86? You might want to dump exports to check the dll https://stackoverflow.com/questions/1548637/is-there-any-native-dll-export-functions-viewer <https://stackoverflow.com/questions/1548637/is-there-any-native-dll-export-functions-viewer>

Note you should not use `__safe` here and instead call the function from within an unsafe block.

Cheers

Monte

> On 20 Feb 2018, at 8:56 am, Brian Milby via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Made my first attempt to just initialize the library and something is not
> working:
> 
> Message execution error:
> Error description: LCB Error in file
> C:/Users/milby/Dropbox/LiveCode/Downloads/lcSodium/sodium.lcb at line 34:
> unable to load foreign library
> Hint: runtime
> 
> Here's all that the LCB does:
> 
> private __safe foreign handler _sodium_init() returns CInt binds to
> "c:libsodium-23>sodium_init!stdcall"
> public handler sodiumInit() returns Integer
> return _sodium_init() --this is line 34
> end handler
> 
> DLLs are in code\x86-win32 and code\x86-win64
> (tried with and without the !stdcall)
> 
> I probably need to start with something a little simpler ;)
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list