How to get Qt-Creator to build using cygwin make?

眉间皱痕 提交于 2019-12-10 14:51:18

问题


Does anyone know how to configure Qt-Creator to use cygwin's make to build a project? Maybe this is a simple cygwin-mangled Windows path problem, but I can't get Qt-Creator to find/run cygwin's make. My make lives in /usr/bin, which is actually c:\cygwin\c\usr\bin on my system. Either way, Qt can't seem to find it using all the obvious build settings I can think of.

Thanks---


回答1:


[This answer works for me using Qt Creator 2.0.93 (beta 2.1), YMMV]

I spent some time tracking down a similar problem: using a non-mingw, non-"supported" build chain from Qt. It appears that Qt Creator uses different environments for build steps based on whether or not you are using a "Make" or "Custom" build step (see the Projects view). The only way I was able to control the actual make invoked and, more importantly, the path where it was run from was to change from using "make" build steps to a "custom" build step. Once I did that, the settings of the PATH environment variable (under build environment) were honored and the right make was chosen.

In other words, try doing these steps:

  1. Set the path in your build environment for you project to include your cygwin stuff.
  2. Create a "custom" build step that calls Cygwin's make with the appropriate options (copied from the old "make" build step).
  3. Delete the old "make" build step.



回答2:


i'm running qtcreator 3.2.1 on windows 8.1.

just enter tools-> option-> build&run-> kits ->add

set sysroot to cygwin folder (e,g: C:\cygwin64) and compiler type to mingw .

(if and when i set gdb to work with that i'll update)



来源:https://stackoverflow.com/questions/4048395/how-to-get-qt-creator-to-build-using-cygwin-make

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!