Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Still seeking working mingw

Date2005-07-02 19:13
FromMichael Gogins
SubjectRe: [Cs-dev] Still seeking working mingw
It depends on the DLL. Run pexports (one of MinGW binutils) on your dll, and see if any functions are listed. If so, then the DLL exports functions, and can be linked directly by gcc -- no need for an import library. In other words, if my.dll contains exports, I can just link using gcc or g++ with the -lmy option. In this sense, the GNU tools are smarter than the Microsoft tools.

On the other hand, if the DLL does not export any functions, then you must make an import library for it for MinGW, using dlltool (another MinGW binutil). Typically, you interrrogate a Microsoft import library for functions, make a list of them in a def file, and build an import library from the def file.

How to do this is explained in various places online including the MinGW binutils documentation. Unfortunately, most of the explanations are either cryptic, sloppy, or out of date. Fortunately, there is a build step that I wrote in the Csound SConstruct for making a MinGW import library for the Python dll (which, of course, does not export any functions -- figure that one out!), so you should be able to see what to do from a currently working example in our own build system.

What DLL exactly are you trying to link with? Knowing that might be helpful. If it's a system library, it should already have an import library in the MinGW lib directory.

Hope this helps, and believe me I sympathize,
Mike

-----Original Message-----
From: jpff@codemist.co.uk
Sent: Jul 2, 2005 6:23 AM
To: csound-devel@lists.sourceforge.net
Subject: [Cs-dev] Still seeking working mingw

I think my current stumbling block is that i can force the compilation
of the library, (although the makefile is broken) but it needs to load
a dll when used, and i cannot see how to make the linker search/load a
dll file.
  I have not seen any helpful advice yet on how to use minGW.  Of
course I can run ./configure but the code in question does not have a
configure, only an autogen.sh and that requires all kinds on stuff
which does not seem to install.

So current question is how to link against a dll?

==John ffitch


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel





-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net