views:

1166

answers:

1

Dears,

I have a windows screensaver that I want to recompile using the QT libraries, so that I can make available for more platforms. I am facing problems with the deployment on Vista and XP.

I compile my screensaver statically with MT, and run the dependency checker. The results are:

MyScreensaver.SCR needs several DLLS, QTCORE4.DLL but no MSVCx80.DLLs. So far this is fine.

My problem is that QTCORE4.DLL in its turn, does need MSVCP80.DLL and MSVCR80.DLL As a result my application does not run on Vista systems.

Can I build QTCORE4.DLL to be statically linked the the microsoft libraries (maybe Libcmt.lib ?) so that I do not have any dependencies in the MS CRT DLLs?

Limitations:

After trying for solutions in various directions, it seems the most feasible one is to use the QTCore4.dll and QTGui4.dll, but having them linked statically to MSVCRT. In this way, neither my program, nor the QT DLLs will have dependencies on MSVCRT dlls.

Is there a solution to this? ( I am new to QT programming )

Thank you, Michael

A: 

I think they are concerted that parts of your application will be compiled with /MD(d) and parts with /MT(d), but if you control everything (including 3rd party libraries) then its pretty safe to use /MT(d).

Shay Erlichmen
thank you Shay, I will retry making a static linking. The previous time I attempted a static linking, the application was causing an error when exiting. The error was after the end of my code, and I thought that this is a problem because of the static linking.Therefore, I will wait a bit, to see if there is an answer in statically linking the QT DLLs with the MS CRT libraries. If there is a way to do this, I would prefer to go that way.
Mike