How to generate vcproj file from .pro file: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
(Cleanup. Added doc links.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''English''' [[How to generate vcproj file from .pro file-SimplifiedChinese|简体中文]]
'''English''' [[How_to_generate_vcproj_file_from_.pro_file SimplifiedChinese|简体中文]]
[[Category:HowTo]]


If you simply have bunch of header file and source file, it is very easy to generate .pro file,you dont need to add each file name in .pro.
To generate an initial .pro file you can use [https://doc.qt.io/qt-5/qmake-running.html#project-mode-options qmake's project mode].


what you need to do is put all those files in on folder, using command prompt set your qmake version in path and do following
To generate a Visual Studio project file, run qmake like this:


qmake -project <br /> Above command will create a project file .pro it will name it as of parent folder name.
<code>
qmake -tp vc myproject.pro
</code>


qmake -tp vc test.pro<br /> The above command will generate vcproj or dsp file depending up on what <span class="caps">MSVS</span> version you have.<br /> You can also add your vcproj file name using -o option.
The above command will generate vcxproj, vcproj or dsp file depending on the Visual Studio version you're using.
 
The -tp switch is documented in the [https://doc.qt.io/qt-5/qmake-running.html#general-options qmake manual].
For more details and other features Visit this [http://doc.qt.nokia.com/latest/qmake-environment-reference.html page] ''[doc.qt.nokia.com]''.
You can also add the name of your VS project file name using the -o option.
 
===Categories:===
 
* [[:Category:HowTo|HowTo]]

Latest revision as of 09:20, 12 June 2020

English 简体中文

To generate an initial .pro file you can use qmake's project mode.

To generate a Visual Studio project file, run qmake like this:

qmake -tp vc myproject.pro

The above command will generate vcxproj, vcproj or dsp file depending on the Visual Studio version you're using. The -tp switch is documented in the qmake manual. You can also add the name of your VS project file name using the -o option.