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

2019-06-21 07:33发布

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---

2条回答
看我几分像从前
2楼-- · 2019-06-21 08:14

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)

查看更多
ら.Afraid
3楼-- · 2019-06-21 08:15

[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.
查看更多
登录 后发表回答