PDA

View Full Version : Custom Qt dll name



tony007
9th March 2006, 16:09
I'm trying to compile Qt 3.3.3 on WindowsXP with a custom name for the dll. i.e. qt-mt333_myname.dll
Has anyone done this successfully?

The steps I've taken are (from a DOS prompt) are:
1. Change the VERSION value in ~/src/qt.pro from 3.3.3 to 3.3.3_myname. ( not sure this step is neccessary )
2. Run configure.exe -debug -shared -exceptions -stl -rtti -thread -qt-style-windowsxp
3. Parse the Qt directory structure changing any Makefiles and .vcproj file references to the wrong name ( i.e. qt-mt*.lib ) to my custom name. This is requred because I think the configuration gets confused by the modified version and thus refers to the .lib file as qt-mt0.lib. Regardless of whether I do step 1 or not, I'd still need to change these references.
4. Run nmake. This builds the src directory fine, but when it trys to build ~/plugins/src/accessible/widgets it falls over with a linker error "LINK : fatal error LNK1104: cannot open file 'MOC.obj'

The strange thing is that if I open the vcproj file for this I can compile it fine. I can then go back to the DOS prompt and run nmake again which will carry on past this point till it hits another Makefile it has a problem with ( ~/tools/assistant/lib ) where the same thing happens over again...

The reason I want to create a dll with a custom name is to avoid the issues that arise when other Qt applications on the user's machine link to my dll because of PATH ordering.

Any help will be very much appreciated.
tony

McToo
10th March 2006, 15:54
If you have more than 1 Qt app on the machine, simply put the qt-mtx.dll that the app was built with in the same directory as the application. That way the PATH is irrelevant as the app will always look in the directory it was launched from for the dll before looking on the PATH.

It's got to be easier than trying to build qt with a custom name. :)

HTH

McToo

tony007
10th March 2006, 16:29
It's not as simple as that I'm afraid :-(
I agree, on Windows that is a fairly safe bet though it isn't unknown for another application to 'find' your dll and use that which can cause problems if your dll configuration differs from what the other application is expecting.

This is probably more of a problem on Linux and as the application I'm talking about runs on Linux and Windows and both applications ship in the same distro I want to maintain a consistent naming convention.

Thanks for the feedback though,
tony