Visual Studio MFC project in Qt Creator
-
How can I open and compile Visual Studio MFC project (and solution) in Qt Creator?
-
I wonder - is that possible in Qt Creator.
The other way is possible i.e., a .PRO file can be opened and compiled on Visual Studio.
~veeraps
-
I know about it. And I'd like to know is it possible to open Visual Studio files under Qt Creator in any way?
-
I am not aware of a way to do so. You can create a dummy .pro file using "qmake -project" and open that in Qt Creator and then reconfigure the build configuration to actually use msbuild for its work.
-
You could load the project into Visual Studio, and then export it to a .pro file using the VS plugin. This is kind of a one way process and the .pro file it produces might need some hand crafting.
-
[quote author="SteveKing" date="1334241204"]You could load the project into Visual Studio, and then export it to a .pro file using the VS plugin. This is kind of a one way process and the .pro file it produces might need some hand crafting.[/quote]
It's not possible for any project except projects using Qt. I have MFC project (without Qt libraries), how can it be exported?
-
In the .pro file that's generated, just add the line
@
CONFIG -= qt
@
to remove the Qt dependencies.(There may be something else you have to do... others will jump in and comment if there is.)
-
No. Sorry, there is some misunderstanding. Plugin wont generate any .pro file if current project is not Qt project. There is menu 'Create basic .pro File', which is only active while current project is using Qt. Or am I get something wrong?
-
There's always the tried-and-true method of using
@
qmake -project
@
as documented "here":/doc/qt-4.8/qmake-running.html to generate a .pro file from a collection of source files. It's not the same as porting from a VS project file, but it's an option. -
Thanks. But if I have about 100 projects and their files collected in many subdirs (which have sometimes subdirs too)?..
Yes. I can use
@
qmake -project -r
@
I also can write some script. Thanks, mlong, you gave me a good idea. The most problematic is to port options of solution and projects, but that's non Qt side :) -
Be aware that .pro files support the SUBDIRS template, which can be useful for nested projects. The docs talk about those, too.