I really need to get this solved and would appreciate any help someone can give me.

I have tried in various ways to use this external library (tqsllib2.dll, compiled with Mingw) with no success.

Here is the latest attempt.

(I have included the library .h in my application header file}

My pro file looks like this:
Qt Code:
  1. INCLUDEPATH += C:\cpp\qt_projects\hrlogger_development\debug\tqsllib
  2. LIBS += -L"C:\cpp\qt_projects\hrlogger_development\debug\tqsllib"
  3. LIBS += -ltqsllib2
To copy to clipboard, switch view to plain text mode 

The first time I try to access the library is like this:
Qt Code:
  1. int ret = tqsl_init();
  2. qDebug() << "ret from tqsl is " << ret;
To copy to clipboard, switch view to plain text mode 

tqsl_init() is defined in the tqsllib.h file I have included and the .h is in the proper directory.

So, as Wysota would say, what is the error?
The code compiles with no errors.

But the error is that when I put the code in to call tqsl_init() as shown above, the application crashes as it starts. With that code commented out, the application runs normally.

So what am I doing wrong here?