I'm trying to use an SDK for a fingerprint scanner. The SDK has the files IBScanUltimate.lib and IBScanUltimate.dll. Dumpbin.exe and dependency walker show up the same "symbols" or exported functions. There is a sample Visual Studio 2008 project that uses these files.
The installation of the SDK is designed for a 64 bit OS.
On Dependency Walker opening IBScanUltimate.dll I can see a table that indicates that the function IBSU_GetSDKVersion has ordinal 1 and hint 70, as well as corresponding information for many other functions. I'm not quite sure what this means. I'm guessing that the ordinal is an index to a table to get access to the function. As for the hint I have no idea.
Now I'd like to use this SDK in an older QtCreator with MinGW32, but I have linking problems.
To make things simple here is the first test project file content:
Qt Code:
  1. QT += core
  2. QT -= gui
  3. TARGET = Kojak1
  4. CONFIG += console
  5. CONFIG -= app_bundle
  6. KOJAKDIR = "C:/Program Files/Integrated Biometrics/IBScanUltimateSDK_x64"
  7. TEMPLATE = app
  9. SOURCES += main.cpp
  10. LIBS +=-L$$KOJAKDIR/lib/ -lIBScanUltimate
To copy to clipboard, switch view to plain text mode 
and here is the content of the file main.cpp

Qt Code:
  1. #include <QCoreApplication>
  2. #include "stdio.h"
  3. #include <windows.h>
  4. #include "IBScanUltimateApi.h"
  5. int main(int argc, char *argv[])
  6. {
  7. QCoreApplication a(argc, argv);
  9. IBSU_SdkVersion sdk_version;
  10. IBSU_GetSDKVersion(&sdk_version);
  11. printf("%s %s",sdk_version.File,sdk_version.Product);
  12. return a.exec();
  13. }
To copy to clipboard, switch view to plain text mode 
The building of the project stops at the linking stage with the following error message
D:\devt\QTProjects\Kojak1\main.cpp:-1: error: undefined reference to `IBSU_GetSDKVersion@4'
My first question is what is the @4 doing there and where did the number 4 come from? My guess is that it was supposed to be the ordinal, but clearly something went badly wrong.
My second question is: is there any way I can get this project to work? I have come up against this kind of situation before and sometimes the link passed and sometimes it did not.
Once when the link did not go through I resorted to dynamically loading the functions by #include <Qlibrary> and a call like this
m_library = new QLibrary( dllLibPath , this);
and then calls to
the_function_pointer = m_library->resolve(the_function_name)
However this is painful
I'm guessing that the culprit may be MinGW32 and that I might have to recompile the whole Qt installation with another compiler, like the one that came with Visual Studio Community edition
2017, or perhaps MingW64. Or maybe I should just install the 32 bit version of the SDK (with a minor performance hit?)