Use qtcreator with makefile project

前端 未结 3 497
感动是毒
感动是毒 2020-12-05 07:15

I have a makefile project. I know that in Eclipse CDT is possible to load makefile project.

Is it possibile to load it in qtcreator?

相关标签:
3条回答
  • 2020-12-05 07:35

    Yes and no. Choose: File->New File or Project...->Import Project->Import existing Project.

    Imports existing projects that do not use qmake, CMake or Autotools. This allows you to use Qt Creator as a code editor.

    It is really the last choice, but you can load a Makefile project into QtCreator. How well it works... hard to say. Depends on the project and how the Makefile is created. Most likely you can compile your project. Editing files: Probably no problem. But adding new files... I don't think QtCreator can handle Makefile changes.

    0 讨论(0)
  • 2020-12-05 07:36

    I've noticed that by default Qt creator runs the command 'make all'. You can modify this under the Projects tab.

    0 讨论(0)
  • 2020-12-05 07:45

    As Greenflow mentioned, Qt Creator can import existing project but it doesn't even depend on the existence of the Makefile. All you need to do for import of the existing project is specify the high-level folder in which the sources of the project are located (including sources in subdirectories) and set some name for the project - the name which Qt Creator will use to display its name. Qt Creator also asks you which files should be included to the project but again, it is simply for the display of sources in the project tree, not for build. Qt Creator uses make tool in the specified build directory by default to build your project but you can override this setting. For example, in the company I work for we have a custom build system and a custom build tool. So when I import some project into Qt Creator, I specify the directory with sources, set some name, specify build directory, override the default make build tool by our custom one, add some include paths to file .includes, if necessary, specify macros in file .config and develop things, that's just it.

    You can see more detailed information about Import existing project feature of Qt Creator here.

    0 讨论(0)
提交回复
热议问题