> > On Monday 09 March 2015 23:44:08 Arjun Das wrote: > > *cpp.exe.2968.1625.jom qtmain.lib(qtmain_win.obj) : error LNK2019: > > unresolved external symbol __imp__CommandLineToArgvW@8 referenced in > > function _WinMain@16 > > > I understand that this error is because of winmain function missing which > > is required by visual studio compiler for any windows applications, > However > > how does qt take care of it? What are the header files to be included to > > avoid this error for qt examples? Please help me with your suggstions and > > let me know if I am missing any steps also. > > That has nothing to do with headers. The problem is linking and it seems > to be > missing at least one DLL. > > According to MSDN (the first hit on Google when you search for > "CommandLineToArgvW"), the function has been in shell32.dll since Windows > 2000. > > So the question is: was shell32 listed in the list of libraries to link to? >
I tried to link the shell32.dll as follows in my .pro file : *HEADERS = hello.h* *SOURCES = hello.cpp \* * main.cpp* *win32:LIBS += C:\Windows\System32\shell32.dll* However I got the following error : > On Monday 09 March 2015 23:44:08 Arjun Das wrote: > > *cpp.exe.2968.1625.jom qtmain.lib(qtmain_win.obj) : error LNK2019: > > unresolved external symbol __imp__CommandLineToArgvW@8 referenced in > > function _WinMain@16 > > > I understand that this error is because of winmain function missing which > > is required by visual studio compiler for any windows applications, > However > > how does qt take care of it? What are the header files to be included to > > avoid this error for qt examples? Please help me with your suggstions and > > let me know if I am missing any steps also. > > That has nothing to do with headers. The problem is linking and it seems > to be > missing at least one DLL. > > According to MSDN (the first hit on Google when you search for > "CommandLineToArgvW"), the function has been in shell32.dll since Windows > 2000. > > So the question is: was shell32 listed in the list of libraries to link to? > I tried to link the shell32.dll as follows in my .pro file : win32:LIBS += shell32.lib I still get the same error. I am not sure how to link a dll file with QT.I was trying to follow an old thread : http://forum.qt.io/topic/6804/using-an-existing-dll-lib-with-qt/9 Moreover, I was expecting the examples to work right away without the user needing to add any extra library.As a beginner, i wanted a good example for reference and go ahead with that. Thanks Regards Arjun
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development