Git Product home page Git Product logo

Comments (5)

Skycoder42 avatar Skycoder42 commented on July 20, 2024

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:

  1. 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
  1. 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 run qmake, nmake and nmake 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 the make 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.

thesoftwhiz avatar thesoftwhiz commented on July 20, 2024

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.

Skycoder42 avatar Skycoder42 commented on July 20, 2024

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:

  1. 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
  2. After the successful build (with the .git), run jom 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
  3. 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.

thesoftwhiz avatar thesoftwhiz commented on July 20, 2024

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.

Skycoder42 avatar Skycoder42 commented on July 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.