A '.a' file is an archive file. As I understand it, it tells the linker where to find your functions inside the dll.
Your "SString-4.dll" should have come with a "SString-4.a" if it was for development use. If you don't have the .a file it's not the end of the world.
-Download Dependency Walker.
-Open your "SString-4.dll" with Dependency Walker.
-On the middle-right side should be a list of all the functions contained in the dll.
-Right click one of these functions and choose "Select All".
-Right click again and choose "Copy function names".
-Paste into Notepad and save as "SString-4.def" in the same directory as your dll.
-The top line in the .def file should be "LIBRARY SString-4.dll". The next line should be "EXPORTS". Your list of functions will be below this.
-After each function leave a space, then a "@" followed by the ordinal number of the function. You can get the ordinals by reading them off the list on Dependency Walker.
Your .def file should now look something like this example here:
LIBRARY K8055D.dll
EXPORTS
SetCounterDebounceTime @1
ResetCounter @2
ReadCounter @3
ReadAllDigital @4
ReadDigitalChannel @5
SetAllDigital @6
SetDigitalChannel @7
ClearAllDigital @8
ClearDigitalChannel @9
WriteAllDigital @10
SetAllAnalog @11
SetAnalogChannel @12
ClearAllAnalog @13
ClearAnalogChannel @14
OutputAllAnalog @15
OutputAnalogChannel @16
ReadAllAnalog @17
ReadAnalogChannel @18
CloseDevice @19
OpenDevice @20
LIBRARY K8055D.dll
EXPORTS
SetCounterDebounceTime @1
ResetCounter @2
ReadCounter @3
ReadAllDigital @4
ReadDigitalChannel @5
SetAllDigital @6
SetDigitalChannel @7
ClearAllDigital @8
ClearDigitalChannel @9
WriteAllDigital @10
SetAllAnalog @11
SetAnalogChannel @12
ClearAllAnalog @13
ClearAnalogChannel @14
OutputAllAnalog @15
OutputAnalogChannel @16
ReadAllAnalog @17
ReadAnalogChannel @18
CloseDevice @19
OpenDevice @20
To copy to clipboard, switch view to plain text mode
-Now open windows command line and type: PATH=%PATH%;C:\Qt\2010.05\mingw\bin (or whatever the path to 'dlltool' is on your build)
-CD to the directory where your dll and .def files are located.
-Then type: dlltool -v --dllname SString-4.dll --def SString-4.def --output-lib SString-4.a
If all was successful you should see a list of stuff from dlltool and your .a file will be created.
I've had to this before with dlls that didn't come with the required files so I understand your frustration -_-.
Bookmarks