If your headers are correct for gcc (including __stcall,
__cdecl, __declspec(dllimport) etc.), you should be able
to just specify libpl.lib directly in the gcc command
line. This works for me under MinGW gcc 3.2, although
at first I had a hard time trying all other other more
complex permuations documented on the web. It seems that
a lot of the documentation for MinGW is rather out of date
and refers to procedures that are no longer necessary.
But there are some pretty good hints here:
You can use the tool nm to display the contents of
If you see names with the prefix
then you need to include __declspec(dllimport) in the
Let me know how this works out for you, I am
interested in doing something quite similar.
> -----Original Message-----
> From: mingw-users-admin@...
> [mailto:mingw-users-admin@...] On Behalf Of
> Udi Kalifon
> Sent: Sunday, April 20, 2003 7:24 AM
> To: mingw-users@...
> Subject: [Mingw-users] Building DLLs that reference other DLLs
> I am writing a DLL that will be used as an extension for a
> Prolog system I use (SWI-Prolog). This DLL makes API calls to
> Tcl/TK on one side, and to Prolog on the other side (it's a
> Tcl/TK extension for Prolog).
> I am getting "undefined reference" errors from dllwrap for
> every Prolog API that I use. I can't link to any *.a file
> like I do with Tcl/Tk, because the Prolog people don't
> provide one. All I have from the Prolog system is a file
> called libpl.lib (and libpl.dll).
> I was unable to determine from the MinGW documenation and
> this list how to make use of these .lib and .dll files. How
> do I link my DLL with functions in another DLL which I didn't
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> MinGW-users mailing list
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/m> ingw-users