Comments (5)
This library is not an official Qt module, but simply a project the follows the same conventions and reuses some of their tools. As such, the official configure script does not know about the existance of the library, even if the source files are correctly present. To build the library statically you have the following options:
- Modify
.gitmodules
: In the Src root folder, you will find a file called.gitmodules
. This one is used by the configure script to identify qt modules. To make it aware of the library, you can simply append the following to the file. Its a somewhat hacky workaround, but should do the job
[submodule "qtjsonserializer"]
depends = qtbase
path = qtjsonserializer
url = ../qtjsonserializer.git
branch = 5.11.2
status = addon
repoType = inherited
- Build the module independently and install it into your compiled Qt. Simply follow the steps from Point 4 of the Download/Installation section in the readme. Make shure to use the same environment as for
configure
and the correct qmake executable. As long as you runqmake
,nmake
andnmake install
(or use jom). The files will all be placed automatically whereever you previously installed your custom Qt build to. (You have to perform a prefixed build including themake install
step.
Im not shure however where the path error comes from though. If neither of the proposed solutions works because of that error, please tell me, so I can find out why
from qtjsonserializer.
Thanks for your reply! I was able to nail it down and get the lib to be built.
First of all it was my mistake to download the latest release and not the one intended for Qt 5.11.2.
Then I had to adjust #include paths like "QtJsonSerializer/qtjsonserializer_global.h" to just the file name (removed the path "QtJsonSerializer/" part) in several files as they reside in the same folder as the ones including them.
I'm pretty sure I'm still missing a step or a setting which copies the files to the appropriate location as I'm sure otherwise you would have heard of this before. Could you tell me what I'm missing so I can build the lib without having to touch the sources at all?
I have recorded the exact issued commands and their outputs attached, however you only need to pay attention to the lines I colered red attached. It is Windows 10 btw.
buid_log.pdf
Thanks!
from qtjsonserializer.
I am glad to hear you where able to build the library. However, there are a few hints I can give you to hopefully make this process easier:
- The headers: Qt requires headers to be "prepared" in a include folder that is part of the build directory. This is normally done by qmake, but only if a
.git
folder is present (for whatever reason). Instead of changing all the includes, simply create an empty folder called.git
in the source root directory. qmake should now automatically create the includes where they are expected. You should rebuild it this way, as otherwise you might get problems with missing/wrong includes when you want to use the static library.- Normally this step is performed on the sources before publishing them (as you can see, all the sources you can download from the maintenance tool have a folder named
include
) - but this is sadly not possible for the source archives that github automatically generates
- Normally this step is performed on the sources before publishing them (as you can see, all the sources you can download from the maintenance tool have a folder named
- After the successful build (with the
.git
), runjom install
- as Qt has to modify and prepare a few more files for them to work properly. This does not have to be done if you compile Qt without the-prefix
option, but then you still need to manually place the files correctly - It is very possible, that the newest version of the library only build with Qt 5.12.0 or newer. However, once you manage to compile the library against 5.11 without issues, it's at least worth another try. I would be at least somewhat surprised if that does not work, as I do not remember adding anything that requires Qt 5.12. Also, the 3.2.0 is the latest release for Qt 5.11, not 3.1.2-4.
from qtjsonserializer.
Alright, adding the .git folder did the trick! The latest release I could build is 3.2.0-2.
3.3.0 throws compilation errors however this is related to Qt. Once I upgrade to 5.12 I'll rebuild your 3.3.0 release. Should you nevertheless want the error log, let me know, I can regenerate and send to you.
I think you can close this issue.
Thanks for your assistance, it is much appreciated! Keep up the good work, great and very helpful Software btw!
from qtjsonserializer.
Glad to hear that. If it's definitly related to the Qt version, that I don't need the error log. Also, thank you for your kind words :)
from qtjsonserializer.
Related Issues (20)
- QHash<int, QString> workaround HOT 2
- It can't convert QSharedPointer successfully.
- How to deserialize derived classes that use none-default constructors HOT 2
- Mac build "make" step giving .reggen errors. Any advice? HOT 2
- Add module fail HOT 1
- Using multiple instances in Qt subdir HOT 3
- Q_GADGET and QVariantList HOT 1
- Deserialization QPair within QVariant
- Cannot find missing dependency "qt.qt5.5130.android_arm64_v8a" ...
- Runtime exception occurred in sample.
- Sample: SerializationException (Unable to determine typeid of meta enum SampleObject::SuperFlags) HOT 1
- Converting QtJsonSerializer from QMake to CMake HOT 1
- Add entries in the repository for Qt 5.15.* and 6
- CopperSpice support HOT 2
- head of line cannot run sample application HOT 1
- Can not serialize enum properties HOT 3
- Poor performance for array of PODs with simple properties
- registerSetConverters results in build time error no matching function to call qHash(...
- Deserialize into existing object
- Create references to existing object , not duplicates HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qtjsonserializer.