Hello, I'm trying to write a C DLL that will interface
with SWI-Prolog on the Windows 2000 platform. I've
lost a full day trying to get this working so any help
would be greatly appreciated.
After trying a myriad of approaches that I found on
UseNet and on the web, I'm at the point where I can
finally compile and link using MinGW. I had tried
using gcc under CygWin with the -mno-cygwin flags, but
I could not get the function calls I exported to be
visible to external programs. Because of this I
grabbed the latest MinGW version 5 installer and I am
now running with that.
I have a C source file that is using the standard
Windows export decorator macro for a single function I
wish to export:
Here are the compile and link commands I am using:
mingw32-gcc -v -LC:\SWI-Prolog\lib -shared -o
mytest.dll mytest.o -llibpl
mingw32-gcc -shared -o mytest.dll mytest.o mytest.def
If I try to use any kind of a "def" file like the one
above, minGW produces an access violation which
triggers the "just in time" debugger on my system.
If I leave out the "def" file, the link works but the
resulting DLL has none of it's symbols exported. At
one point I tried the "-Wl,-export-all-symbols" option
but that didn't help.
I can load the DLL in the Micrsoft dependency viewer
and there are no exported symbols at all.
I really want to get this working. How can I make a
DLL that works?
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
From: John Brown <johnbrown105@ho...> - 2006-09-10 23:19:38
>From: robertoschler <robertoschler@...>
>Date: Sun, 10 Sep 2006 13:25:34 -0700 (PDT)
>Hello, I'm trying to write a C DLL that will interface
>with SWI-Prolog on the Windows 2000 platform.
There is a section in the MinGW FAQ that deals with making DLLs.