Unsolved is the combination VS2017, c++, linux and QT5 possible?
-
Hello,
Since a few weeks, I'm using Visual Studio 2017 on Windows 10 for C++ linux development.
This works great for console applications.Is it also possible to add QT5 to this setup so I can also develop GUI based applications on my Windows machine and VS2017 for linux?
If yes, is there a tutorial available?
-
You cannot do a direct compilation on VS2017 and run the application on linux. Basically you can use the same source code, but you have to recompile on each system. Cross-compilation is possible, but not really recommended. Typically it is easier to transfer code and recompile on linux or windows with native compilers.
You can install a version of pre-compiled Qt libs (check for the VS2017 version on widnows). Note: you cannot arbitrarily choose an VS version, since not all are compatible. As an exception VS2015 and VS2017 are comptaible, but it is always better to stay straight with those versions.
On linux you have to install also a pre-compiled version.
As a personal recommendation the Qt creator exists on linux and windows. It saves you some suffering, when you are using the same IDE on all OSs. You can use the VS2017 compiler from inside of Qt creator.
Another option is MinGW compiler on Windows. This is a Windows based gnu C++ compiler, which you are also using on linux. -
You are right about recompiling on linux but for console apps this solution works fine:
https://blogs.msdn.microsoft.com/vcblog/2017/04/11/linux-development-with-c-in-visual-studio/
I'm using VS2017 for C# development too, so I like the idea to have just one dev environment.
Yesterday, I also found www.visualgdb.com
Maybe I should give that solution a try.