Are you using a static postgresql library?
To be honest I dont know. I just use the defaults and a qmake file that ends like above.
How can I find out if it's static?
I think the extension really is ".a". Doesnt that tell you?
If I could solve my problem by moving to a non-static library I would.
You should be aware of the tools you are using. Use of static libraries is completely different than use of dynamic ones so first decide whether you want to use statically or dynamically linked libs and only then actually start trying to use them. Licencing issues are a concern here as well.
We're getting off the subject.
No, we are not. The dynamic version of libpq requires the following libraries:
text Code:
linux-gate.so.1 => (0xffffe000) libssl.so.1.0.0 => /usr/lib/libssl.so.1.0.0 (0xb76ba000) libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0xb74f9000) libcrypt.so.1 => /lib/libcrypt.so.1 (0xb74b0000) libc.so.6 => /lib/i686/libc.so.6 (0xb735e000) libdl.so.2 => /lib/libdl.so.2 (0xb7359000) libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb7341000) /lib/ld-linux.so.2 (0xb776a000)To copy to clipboard, switch view to plain text mode
The static one requires all undefined symbols to be defined. You can use nm and grep to see what they are.
Well, if there are two choices it's not hard to give an answer as you have indeed shown.
So grep is used in this case to look inside binaries, right?
Now I dont know if the dynamic libraries involve the same licencing conditions, or more to the point, where can I find out for this case?
Thanks.
Last edited by feraudyh; 22nd September 2010 at 13:59.
No, it's used to filter out results of nm.
As far as I remember PostgreSQL is LGPL which means that if you are writing a closed-source application, you can't link it statically. But feel free to check it on PostgreSQL website.Now I dont know if the dynamic libraries involve the same licencing conditions, or more to the point, where can I find out for this case?
Wow, the difference between linking statically and dynamically really seems like splitting hairs, but I will look up the postgres site.
You have given me very useful advice.
It's also a difference when it comes to deploying your program. Either you need to deploy the library with your program (when linking dynamically) or not (when linking statically) at a cost of increased binary size.
I get it, when you are deploying the library, someone else can start developing with it too, if he has the documentation.
Bookmarks