Closed akamensky closed 6 years ago
Same error on current master branch
I don't have a Mac but it seems like a link line issue... Will need help to fix it, you can try to play with CMake rules to see if it can be addressed.
I could look and see, perhaps it does not find relevant headers/libraries. But not sure how long that would take me as my schedule is a bit busy these days. Also I am far from familiar with cmake files. Any suggestions where to start looking would be appreciated.
Okay, after some short digging I found that building against open-source version of Qt works flawlessly, but building against statically built version does not work (version built from sources provided by Qt for commercial license).
My curious question is whether this library I got will work when building statically linked application (I presume for license reasons this lib will have to be linked dynamically, since it is licensed under LGPL3 and not some more liberal but still compatible license).
Statically linking is always tricky, it's not working very well so you're really looking into a rabbit hole now :rabbit2:
This keeps me wondering -- why on Earth LGPL? Qt libraries are not restricted to GPL/LGPL licenses, any other license with more liberal permissions could be used, such as BSD (3 clause) or MIT, or even Apache. With all honesty -- GPL is evil, which either forces me to link dynamically (and then my application is unusable for my case of tiny embedded device due to size restrictions) or I am forced to open-source it (or at the very least provide static libs for manual relinking by whomever), which none of the business would agree to do.
And static linking is not that complicated to be fearing it :)
I guess can be closed as seems there is no way to properly link this library to statically built Qt application (as it drags in 3 other libs that combined make the size of over 10 MB and that's not counting the size of application executable itself which is about 5 MB when statically linked).
Branch: stable (2594d83ea02f9ca6b19e682a228344205fb478bf) Building with Qt5.10.1 static build
cmake cmdline:
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/qt/libQtShadowsocks -DQt5Core_DIR=/usr/local/qt/5.10.1-static/lib/cmake/Qt5Core -DQt5Network_DIR=/usr/local/qt/5.10.1-static/lib/cmake/Qt5Network -DQt5Test_DIR=/usr/local/qt/5.10.1-static/lib/cmake/Qt5Test
make cmdline:
make all