Any Windows DLL experts out there?

15 views
Skip to first unread message

Boothj5

unread,
Jun 8, 2016, 6:51:26 PM6/8/16
to profanity development
I'm currently stuck trying to get C plugins working on Cygwin which uses Windows DLLs rather than Linux Shared Libraries.

The problem is as follows:

1) The Profanity library libprofanity installs (API functions are assigned NULL)
2) Plugins can be compiled against the library
3) Profanity can call the prof_init() function in the plugin
4) When the plugin tries to call a library function (e.g. prof_cons_show()), a segfault occurs since the function is still assigned NULL.

On Linux, the functions are assigned values when Profanity is run, see c_api_init() at https://github.com/boothj5/profanity/blob/master/src/plugins/c_api.c

I've tried many things after reading various documentation but can't seem to get things working.

https://cygwin.com/cygwin-ug-net/dll.html
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Using_ld_the_GNU_Linker/win32.html
https://www.sourceware.org/autobook/autobook/autobook_137.html#DLLs-with-Libtool

Reply all
Reply to author
Forward
0 new messages