Windows – Renaming DLLs on Windows

dllqtqt4windows

I am building an application on Windows with Visual Studio 2003.

My application is linking to 3rd party lib (Qt). The lib is called qtcore4.lib and the dll qtcore4.dll.

My application is a plugin to another Qt based application which uses different versions of the same qtcore4.dll.

Unfortunately, I can not use the same version of Qt as the host application so I am thinking if it would work if I would rename the lib and DLL of my version of Qt, such as:

qtcore4_my.lib
qtcore4_my.dll

I guess qtcore4.lib refers to the qtcore4.dll inside. So I am not sure this would work at all.

Best Answer

You should take care of using two different versions of the same library in the same application.

If the plugin interface uses classes from QT, then you should expect pottential nasty problems (like crashes).

The most simple way of doing it is to recompile qt and configure the building process to produce the dll and lib files with other names.