Unsolved Managing .so and .pro references
-
Hi
coming from an ide such as visual studio, it seem my biggest challenge is to manage the project lib/.so files.
I am building a layered application but there is always some .so file needed by another .so file and I cant seem to get it working.
is there any best practice or guideline I can use to sort this type of stuff out?any help appreciated, thanks
-
Hi,
could you elaborate what you mean with
I cant seem to get it working.
Adding a dependency in a pro file is made using
LIBS +=
in pro file. Are you trying to build a project consisting of multiple libraries? -
Hi,
Depending on your target platform, pkg_config can be a good option to alleviate that kind of problem.
Otherwise tools like ldd or Dependency Walker can help you identify dependencies.
At last, the documentation of the library you are using should also give you that kind of information.
-
@JohanSolo yes i am trying to build a project based on multiple subprojects. I get .so files missing, so i copy it to folders manually but then I get vtable erorrs upon building, its really annoying. so i add the .so files to my project using the add lib function, its an internal lib as its in the same project structure, but it cant seem to find the .lib being referenced.
cant seem to get it working means that everytime I build i get errors, .so missing, vtable etc....
-
@SGaist my platform is Linux, its not an external library, its all internal libs in the same project
-
I think SUBDIR template is your friend, and
ordered
will take care of the build order.
On Linux, there is no need to copy libraries, qmake takes care of setting therpath
for you. -
@JohanSolo i am using the subdirs template.
i got it sorted out thanks for your help.
-
I'd recommend to avoid
ordered
. There's this very good article about setting up dependencies properly in a subdirs project. -
@SGaist said in managing .so and .pro references:
I'd recommend to avoid
ordered
. There's this very good article about setting up dependencies properly in a subdirs project.Thanks for the hint!