Qbasicnews.com

Full Version: What's with these .a files?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do you make them? I have a dll which I'd like to use with FB, but all I have are the VB declarations which I wrote ages ago for it. So how do you go about making these .a files?
LD will create them when you link the DLL using LD itself, now to import symbols from a DLL already made (all *.dll.a are import libraries, not the libs itself), it's not so simple.

First you need the .def of that DLL, if you don't have one, the pexports from mingw32 package will create one (pexports -o filename.dll >filename.def).

With the .def file, you then call another mingw app: dlltool as "dlltool --def filename.def --dllname filename.dll --output-lib libfilename.dll.a", that will create the import library, copy it to the /libs dir and fbc will find it, if $inclib "filename" was used or each prototype has a lib "filename" on them.
Almost worked. Got this error:

harmony.o(.text+0xf):fake: undefined reference to `HarmonyGetVersion@0'

Attempting to make a header for harmony.dll. It would be far easier to do if you could just link to dlls directly rather than having to go through this .a process.