AW: Loading shared Libraries

Karsten Kusche <[email protected]> Mon, 10 Oct 2022 05:51:50 +0000
Newsgroups gmane.comp.lang.smalltalk.vwnc
Message-ID <[email protected]>
Hi Karl,

Please use a tool like Dependency Walker or the newer Dependencies (https://urldefense.com/v3/__https://github.com/lucasg/Dependencies__;!!DZ3fjg!5FhxDisqoCLd03r2q-Ai9pv2shD8Mpanzys_2wlnkqlwbuaNfq-UBuj-5mX2cnboNQShR_aZlYUz9ZvV$  ) to see if your DLL requires other DLLs to be loaded. If these other DLLs fail to be loaded, your DLL will also fail.
Also if #primLoadLibrary fails, there's an error code that explains why it fails. The error number is a standard Microsoft error number and you can find a description of what the error number says. That doesn't mean the description is helpful but it may give you pointers as to what's wrong.

From a technical point of view there's no difference between loading a DLL from Smalltalk or writing a C-App and loading a DLL there. They all use the same API for loading libraries and they can all fail for the same reasons.

Kind Regards
Karsten


Von: [email protected] <[email protected]> Im Auftrag von BREITH Karl-Albert (Framatome)
Gesendet: Montag, 10. Oktober 2022 06:42
An: Vwnc ([email protected]) <[email protected]>
Betreff: [vwnc] Loading shared Libraries


I am trying to create a shared library (dll) on Windows 11 using cygwin64 and gcc.
The Smalltalk version I am using is 32-Bit VW9.2.

Whatever I tried, Smalltalk brings a primLoadLibrary error.

Does anybody know if there is something special to be done in cygwin64 to create a loadable dll (32bit) ?

Karl

This (the standard for me on normal Linux) does not work:

gcc -m32 -c -shared *.c
ld -melf_i386 -shared -symbolic -o lib.dll  *.o
---------------------------------------------------------
Karl Breith
[email protected]<mailto:[email protected]>