This is slightly academic as I've resolved it (I think!), but curious if anyone knows why it's happened.
I'm working on a project that has been developed for a few years, we have a couple of libraries we depend on, for example:
myencryption.so
|
----- #include <openssl/sha.h>
mymainapp
|
----- LIBS += -lmyencryption -lssl -lcrypto
When it fails it fails with messages like this:
../../bin/libbcencryption.so: undefined reference to `SHA256_Update'
../../bin/libbcencryption.so: undefined reference to `SHA256_Final'
../../bin/libbcencryption.so: undefined reference to `SHA256_Init'
That used to work and build fine, now we're moving our platform forward and GCC 4.6 is the latest version available it causes significant build issues with linking the libraries in this way, but only when the library is linked against a binary. Now to get the build to work it's structured:
myencryption.so
|
----- #include <openssl/sha.h>
----- LIBS += -lssl -lcrypto
Which works fine. Other things like references to Qt libraries that were never needed in compilation before are also required.
I can't find any reference to something changing like this in the GCC release notes however so I'm definitely curious if anyone knows if it has changed or whether another factor might be involved, so it's a Qt based project that's move from a base platform of Ubuntu 11.04 to 12.10, and the GCC version has gone from 4.5.2 to 4.6.3. Nothing in the build process aside from whatever upgrades have come through in Ubuntu has changed.
EDIT: It looks like the answer referenced in the comments comes close to explaining the issue, with an update to ld
causing the headache.