I'm using the Qt VS Tools 3.4.1. Previously I was using 2.10. One of the applications in our solution is an MFC application that contains a single UI file that requires the moc compiler. So this application's vcxproj is marked as a Qt project. Previously this worked fine. After updating to 3.4.1, however, when compiling I get the error
qtmaind.lib(qtmain_win.obj) : error LNK2019: unresolved external symbol main referenced in function WinMain
As seen in the screenshot, vcxproj file generated by the VS Addin always links with qtmain(d).lib. Furthermore, strange hard-coded directories are added to the library paths (mysql, etc). I assume this generated vcxproj file is the issue, somehow?
After some searching, I tried adding the -= entrypoint flag to the qmake settings, but this doesn't help
To Reproduce
Steps to reproduce the behavior:
Convert an MFC project (which uses MFC's WinMain) to a Qt project by adding the 'QtVS_v304' keyword, props and target files.
Expected behavior
Qt projects shouldn't always link with qtmain.lib, or it should be able to be turned off.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- Qt VS Tool Version Qt VS Tools 3.4.1
- Visual Studio version VS2022
I'm using the Qt VS Tools 3.4.1. Previously I was using 2.10. One of the applications in our solution is an MFC application that contains a single UI file that requires the moc compiler. So this application's vcxproj is marked as a Qt project. Previously this worked fine. After updating to 3.4.1, however, when compiling I get the error
qtmaind.lib(qtmain_win.obj) : error LNK2019: unresolved external symbol main referenced in function WinMain
As seen in the screenshot, vcxproj file generated by the VS Addin always links with qtmain(d).lib. Furthermore, strange hard-coded directories are added to the library paths (mysql, etc). I assume this generated vcxproj file is the issue, somehow?
After some searching, I tried adding the -= entrypoint flag to the qmake settings, but this doesn't help
To Reproduce
Steps to reproduce the behavior:
Convert an MFC project (which uses MFC's WinMain) to a Qt project by adding the 'QtVS_v304' keyword, props and target files.
Expected behavior
Qt projects shouldn't always link with qtmain.lib, or it should be able to be turned off.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):