RE: Loading shared Libraries

Steven Kelly <[email protected]> Mon, 10 Oct 2022 15:17:10 +0000
Newsgroups gmane.comp.lang.smalltalk.vwnc
Message-ID <HE1P194MB0027750D40701C223BC96A6AA6209@HE1P194MB0027.EURP194.PROD.OUTLOOK.COM>
That looks like it’s more a problem in how you’re building the library, rather than a problem in VW:

gcc -m32 -c -shared *.c
ld -melf_i386 -shared -symbolic -o lib.dll  *.o

I wouldn’t think a DLL could be in ELF format, as that’s only used on Linux?

Cross-compiling in cygwin64 for 32-bit binaries seems to be here:
https://urldefense.com/v3/__https://stackoverflow.com/questions/30119573/compile-32bit-code-from-cygwin64__;!!DZ3fjg!4cav5UVMmQQBoGAgC8Le6WdZKysQZlHvfOV_je0XIrRqtoK0TCohbnxwBXA0MB561CoZo2YmfOIU7TEQ$  
https://urldefense.com/v3/__https://stackoverflow.com/questions/53299112/compiling-a-32bit-c-program-with-cygwin-on-win10-clion-wont-work-with-any-c__;!!DZ3fjg!4cav5UVMmQQBoGAgC8Le6WdZKysQZlHvfOV_je0XIrRqtoK0TCohbnxwBXA0MB561CoZo2YmfOE2WTYE$  

Your life would probably be easier if you used a 32-bit Cygwin.

Sorry I don’t know any more about this – good luck!
Steve

From: [email protected] <[email protected]> On Behalf Of BREITH Karl-Albert (Framatome)
Sent: Monday, October 10, 2022 7:42 AM
To: Vwnc ([email protected]) <[email protected]>
Subject: [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]>