When I try to use QJson library application cannot even start. I get message path\app.exe exited with code 128.
I include QJson in app.pro as followsLIBS += qjson/lib/qjson0.dll
QJson is in my project directory and I includ eserializer.h #include "qjson/src/serializer.h"
Then when I try to declare Serializer objectQJson::Serializer serializer;
I got this code 128 error when trying to run application. I tried to debug it and check on what line it has problems but it seems like it doesn't even start to execute main function, although the process mingw32-make.exe exited normally.
Asked
Active
Viewed 1,076 times
0
1 Answers
1
Most probably the qjson DLL is not found. Try adding the directory it is located in to the PATH, or copy the DLL into the same directory where your executable is.

Frank Osterfeld
- 24,815
- 5
- 58
- 70
-
Indeed it seems the DLL not found was reason of this problem. To solve this problem it was enough to change LIBS += qjson/lib/qjson0.dll into LIBS += "qjson/lib/qjson0.dll", i.e. adding quotation marks. – krltos Feb 26 '12 at 12:05
-
1Interesting. Are you sure you didn't touch the path in between? LIBS only affects finding the lib at build-time (linking), not runtime. – Frank Osterfeld Feb 26 '12 at 12:26
-
Embarrassing mistake... I realized now that I've copied the dll file to project directory... So you're right that quotation marks don't matter. – krltos Feb 26 '12 at 12:43