How to build and run in Visual Studio?
-
wrote on 9 Dec 2018, 21:15 last edited by kitfox 12 Sept 2018, 21:18
I have a simple project hat I've been working on it QtCreator and wanted to see if I could compile in Visual Studio. It only has one .pro file and uses qmake to build.
I opened Visual Studio (Qt tools were already installed) and selected Qt VS Tools/Open Qt Project File... I then browsed to my .pro file. Visual studio opened it and generated a few files. When it seemed done, I clicked on the run button labled
Local Windows Debugger
to compile and run my program. However, all I got was an error message saying"cmd.exe" exited with code 2
.Did I forget a step?
-
Are you working in Qt Creator with Qt Visual Studio libraries &MSVC compiler ? Did you install the visual studio plugin ?
-
I have a simple project hat I've been working on it QtCreator and wanted to see if I could compile in Visual Studio. It only has one .pro file and uses qmake to build.
I opened Visual Studio (Qt tools were already installed) and selected Qt VS Tools/Open Qt Project File... I then browsed to my .pro file. Visual studio opened it and generated a few files. When it seemed done, I clicked on the run button labled
Local Windows Debugger
to compile and run my program. However, all I got was an error message saying"cmd.exe" exited with code 2
.Did I forget a step?
@kitfox As @dheerendra suggested you can use Visual C++ compiler in QtCreator without using Vsual Studio. Do you really need to use Visual Studio?
-
wrote on 10 Dec 2018, 19:01 last edited by
I used Visual Studio IDE because I thought that's what you were supposed to do. At this point I'm just testing it out to see how well it works. Was also interested in seeing if it might provide a better debugging experience.
-
Are you working in Qt Creator with Qt Visual Studio libraries &MSVC compiler ? Did you install the visual studio plugin ?
wrote on 10 Dec 2018, 19:02 last edited by@dheerendra I installed the Qt plugin for Visual studio. I don't know the answers to your other questions. I just went with the defaults.
1/5