/************************************************************************ * Building QT projects from the COM Mand Line * Description: * Most of the time, the project is created and compiled through Qtcreator, but sometimes it is possible to encounter some compilation problems, when the command lines create a project, compile the project can be used as a test, verification of a means. * 2016-3-2 Shenzhen Nanshan Ping Shan village Zengjianfeng ************************************************************ ***********/One, reference document: Building QT projects fromThe command line http://processors.wiki.ti.com/index.php/building_qt_projectssecond, the basic operating procedures:1. After installing your host Ubuntu and then the SDK on your host machines: [How to install Ubuntu and your SDK] on your computer Install Ubuntu and SDK. 2. Create ANewdirectory on your Ubuntu10.04host. Create a directory in Ubuntu, called: Hello-World . [Email protected]-desktop:~ $mkdir hello- World3. Change to that directory enters the catalog that you just created. [Email protected]-desktop:~ $CD hello- World4. Source the environment Setup toGetaccess to Qmake and the GCC compiler import environment variables so that you can use the Qmake and GCC compilers. [Email protected]-desktop:~/hello-world$ source/home/user/ti-sdk-am335x-evm-05.03.00.00/linux-devkit/environment-Setup5. Create ANewFile:hello-world.cpp and copyinchThe following source code to hello-world.cpp Create Hello-world.cpp file, and copy the following source code into the file. #include<QApplication>#include<QLabel>intMainintargcChar**argv) {qapplication app (argc, argv); Qlabel Label ("Hello world!"); Label.show (); returnapp.exec (); } 6. Execute the following commands: (If you already has a project file skip step1execute the following command: (skip this step if you already have a project file) [Linux-devkit]:~/hello-world> Qmake-project//The first command creates a project File:hello-world.pro.[linux-devkit]:~/hello-world> Qmake//The second generates a makefile based on the project file.[linux-devkit]:~/hello-world> make//The third compiles and builds the project. 7. This isWhat do you have just created this is the file that you created, or the file that was just generated. [Linux-devkit]:~/hello-world>ls Hello-world hello-world.cpp HELLO-WORLD.O hello-World.pro Makefile8. Copy the Hello-world binary over to your file system and run hello-World on your target. Will HelloThe-world binaries are copied into your file system and run on the target machine.
Building QT projects from the command line