View Full Version : QJson Windows compile problem
skepticalgeek
7th August 2010, 08:07
I have developed a Qt application in Linux that uses the QJson library. It works fine, and now I am trying to port it to Windows. I got the source from the git repository, extracted it to C:\Qjson, and built it using Qt Creator. I now have a qjson0.dll file in my C:\Qjson\lib directory. I can't seem to link to it though. I downloaded the sample foo application and changed the include path and libs lines to:
INCLUDEPATH += C:\Qjson\src
LIBS += Lc:\Qjson\lib -lqjson0
But every time I try to build, I get "qjson/parser.h:no such file or directory". The paths to the header files and dll are correct. BTW, I also tried :
LIBS += C:\Qjson\lib\qjson0.dll
as well. No difference. Any insights?
tbscope
7th August 2010, 09:22
I have developed a Qt application in Linux that uses the QJson library. It works fine, and now I am trying to port it to Windows. I got the source from the git repository, extracted it to C:\Qjson, and built it using Qt Creator. I now have a qjson0.dll file in my C:\Qjson\lib directory. I can't seem to link to it though. I downloaded the sample foo application and changed the include path and libs lines to:
INCLUDEPATH += C:\Qjson\src
LIBS += Lc:\Qjson\lib -lqjson0
No, that's not correct.
1. do not use absolute paths if you intend to release your code.
Instead you yourself and your users should install Qjson in known paths. Check the Qt documentatioon.
2. your LIBS variable is wrong, it should be:
LIBS += -Lc:\Qjson\lib -lqjson0
But every time I try to build, I get "qjson/parser.h:no such file or directory". The paths to the header files and dll are correct.
The paths are not correct, obviously.
The error also says everything you need to know.
does c:\Qjson\src\qjson\parser.h exist?
If not, and I'm sure it doesn't, find the correct folder where it is located and use that folder as include path.
By the way, if you do install Qjson in known paths, you do not have this problem!
BTW, I also tried :
LIBS += C:\Qjson\lib\qjson0.dll
as well. No difference. Any insights?
That's certainly not correct!
skepticalgeek
9th August 2010, 01:15
Thanks. Solved my issue.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.