-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building on Windows fails, missing xlocale.h #33
Comments
The same problem with mingw (with Qt 5.1.1). I fixed it by using QLocale instead of locale_t. If you interested in this - I can make little patch. |
I would rather prefer to find the right header which provides BTW, it would be nice to see your patch. Maybe you can attach it here. |
Hi. It's not a problem to find xlocale, there is other problem with linking. So I noted all my steps in both way (one for xlocale and other for QLocale). === Way 1. Looking for < xlocale >. === json_scanner.h: line number 39 #include < xlocale > can be disabled, because all needful functions can be found in < locale.h > (included at line 36). When you will disable it, you will got messages So, let's go deeper. And strtod_l() disabled for MINGW32, but at my machine we have no predefined strtod_l() so we need to define it. After all these steps you will got problems with linking: json_scanner.o: -1 : In function I tried to solve this problem by reading MSDN and found .dll file to link, but I was failed. So I you find what library we need to link with QJson it can work and fix problem. === Way 2. Fixing with QLocale===
#include < QLocale >
JSonScanner::JSonScanner(QIODevice* io) JSonScanner::~JSonScanner()
After these steps I got successful compilation and linking. But I have one question. As I see, you uses m_C_locale for deserializing double but do we also need to use it for serialization? Hope it will be useful for you. Also, please help me with issue "Problem when trying to parse simple Json" (#39). When I uses successfully compiled library and tries to parse simple JSON I have problem "json syntax error, unexpected invalid 4". As I told in issue, my JSON is very simple and looks like this: { If you want, I can make little code which generates this JSON and then falls when tries to deserialize it. Sorry for my English. Best regards, Bohdan. |
I can't compile my project with Qt-4.8.5-mingw $ make |
This has been fixed by PR#44 |
I am building QJson with MSVC 2010 and I get the following error:
c:\projects\qjson\src\json_scanner.h:37: error: C1083: Cannot open include file: 'xlocale.h': No such file or directory
However there is a header called xlocale, so I changed the include. But then it complains that there are no symbols "locale_t" and "newlocale". Is it supposed to build with Microsoft compilers at all?
The text was updated successfully, but these errors were encountered: