I guess using platform headers does work out of the box. I realized the compile error came from the example code I pasted from MSDN using ShellExecute. I removed everything but the use of ShellExecute, included <windows.h>, and had no compile errors. I still needed to link to the windows shell library, and I figured out how to do that from the .pro file, LIBS += shell32.lib.
Thanks for the suggestion. I don't understand the reason for the Qt platform headers, I suspect they are for internal use. I was expecting an answer like "put CONFIG += windows in your .pro file".
Another tip, I'm using DEFINES+=UNICODE in my .pro file to get use of Unicode versions of platform code. For example, now I can feed QString (converted to stdW string) right into the arguments of ShellExecuteW.




Reply With Quote
Bookmarks