-
Notifications
You must be signed in to change notification settings - Fork 231
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
Can't build with Qt 6.8.1 #174
Comments
Arrgh trying to build using a set of instructions assuming the top level CMakeLists.txt file is in src dir, whereas it is NOW in the to level dir (since 3 days ago). Still would like to know if you will accept a pull request. |
Hi @perdrix52! 🙂 What is your use case for which static linking would work better? The library is licensed under LGPL, so building it as a static library could just cause unnecessary licensing issues, while providing little or no benefits over dynamic linking. |
We have a lot of dependencies that we link statically, and that's much simpler to handle than shipping .so files in our installation and therefore having to handle issues with libpath etc.. D. |
The other reason for static linking is this: If I disable the calls to stuff in SmptMime.so and link the code it works. But if I enable the calls and rebuild I get the above error. Do you know how to solve that? |
BTW I think there's an error in your CMakeLists.txt: It says: |
I found out why the library isn't built with RPATH/RUNPATH set to $ORIGIN.
See Craig Scott's (*) comments in the CMake discourse thread referenced in my previous comment. So the top level CMakeList.txt should read:
With those changes the library is built correctly with $ORIGIN set in RUNPATH (*) Craig Scott - author of Professional CMake. |
Do you want me to fork the project and create a PR for this or will you apply the changes yourself? Thanks, David |
You need to find and link the Qt "Network" package to your project in a subdirectory (also put the .so next to the release executable). Because the .so calls to other libraries depend on your linking. Also try clearing the cmake cache. P.S. Just trying to help with the same error we encountered once |
That wasn't the problem - the problem was the cmake files and r(un)path settings. |
Fixed. Thx! |
Get this error:
command used was:
PS I'd still greatly appreciate being able to build this as a static library. If I can find the time would you accept a pull request to allow that?
Cheers, David
The text was updated successfully, but these errors were encountered: