PDA

View Full Version : QT4 dynamically linking to my own (conflicting) Freetype library.



barr
3rd October 2010, 21:51
Hi,

I am writing a C++ application in Kubuntu 10.04 and am facing an issue I have not had before. My application statically links to an external library which includes its own Freetype copy, and it dynamically links to the system Qt4 library which itself includes its own Freetype copy.

What happens is that Qt calls the static library Freetype instance leading to a lot of strange warnings and various segfaults. Since I have access to the static library code I confirmed the problem by removing Freetype from the static library (hence forcing the use of the Qt version instead) and the application works as expected.

Is there a way to solve this issue and not having to use a special build rule for Linux? I am not seeing this problem under Windows or OSX despite using an even more recent version of Qt. It was not happening a few months ago, and I believe it is because, at that time, the static library and Qt were using 'compatible' versions of Freetype.

Thank you for any help or advice you can give me!

Ps: I though Trolltech had rename symbols in their Freetype implementation from FT_ to QT_FT_...