Cygwin make 错误:*** 目标模式不包含 `%'
我在使用 cygwin make.exe 版本:3.81(重新)构建时遇到此错误。
Error : *** target pattern contains no `%'.
I got this error while (re)building, using cygwin make.exe version :3.81.
Error : *** target pattern contains no `%'.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(11)
此错误是由于存在
":"
造成的。 因此它不再支持 Windows 路径。您需要下载3.80版本并替换
\bin
目录中的make.exe
。显然它也需要
cygintl12.dll
。This error is due to a presence of a
":"
. Therefore it no longer supports windows paths.You need to download version 3.80 and replace the
make.exe
in the\bin
directory.Apparently it needs
cygintl12.dll
too.回滚到 3.80 (Geant4)
cd /usr/bin
mv make.exe make_381.exe
wget http://geant4.cern.ch/support/extras/cygwin/make.exe
chmod +x make.exe
从 cygwin 安装程序安装
libintl2
以获得所需的cygintl-2.dll
rollback to make 3.80 (Geant4)
cd /usr/bin
mv make.exe make_381.exe
wget http://geant4.cern.ch/support/extras/cygwin/make.exe
chmod +x make.exe
install
libintl2
from cygwin setup for the requiredcygintl-2.dll
当我尝试在 Linux 或 OSX 上构建项目时,我遇到了同样的错误,该项目之前是在 Windows 计算机上构建的,并且在输出文件夹中存在一些 .od 文件。
当我手动删除 .od 文件后,问题就解决了。 显然,我的 IDE(本例中为 CodeLite)的“Clean”命令没有删除 .od 文件。
I got the same error when trying to build a project on Linux or OSX, that was previously built on a Windows machine and had some .o.d files hanging around in the output folder.
Once I manually deleted the .o.d files the problem was resolved. Apparently the "Clean" command of my IDE (CodeLite in this case) wasn't deleting the .o.d files.
最有可能是由于驱动器号后面存在冒号。 例如,考虑
如果
那么一切都很好,但
会导致您收到错误。
Most likely due to the presence of a colon following a drive letter. For example consider
If
then all is well, but
results in the error that you get.
我收到此错误是因为命令开头没有制表符 (\t)。 我的 vim 集中有 Expandtab,所以它用 4 个空格替换制表符。 当我关闭它并将空格更改为选项卡时,它被修复了
I was getting this error because I didn't have a Tab (\t) character at the beginning of my commands. I had expandtab in my vim set so it was replacing a tab character with 4 spaces. When I turned that off and changed spaces to a tab it was fixed
在使用 cygwin 使用 Android NDK 进行构建时,我遇到了
target pattern contains no '%'
错误。我发现以下链接很有帮助:
因此,我的解决方案包括将系统变量从 Windows 格式更改为 Unix 格式,如下所示:
/cygdrive/c/Android,而不是
为 NDK 路径。C:\Android\android-ndk-r10c
/android-ndk-r10c同样,我将 NDK 项目路径更改为
/cygdrive/c/Android/project/src/main/jni
。I had the
target pattern contains no '%'
error while building with the Android NDK using cygwin.I found the following link helpful:
And so, my solution included changing my system variables from Windows format to Unix format like so:
C:\Android\android-ndk-r10c
, I used/cygdrive/c/Android/android-ndk-r10c
for the NDK path.Similarly, I changed the NDK project path to
/cygdrive/c/Android/project/src/main/jni
.就我而言,当我收到此错误时,我正在 Cygwin 下使用 CMake。 原来是执行了Windows版本的CMake。 随后,在 make 文件中使用了 Windows 路径。 我通过安装程序安装了 Cygwin 版本的 CMake 并使其正常工作。
In my case I was using CMake under Cygwin when I got this error. It turned out the Windows version of CMake was executed. Subsequently, Windows paths were used in the make file. I installed Cygwin's version of CMake through the setup program and got it working.
当构建目录包含“:”时,我在 Linux 上遇到了这个问题,这是由于进行了 Mercurial 签出操作而导致创建了一个名为“server:port”的目录。
I had this problem on Linux when the build directory contained a ":" caused by doing a mercurial checkout which created a directory named "server:port".
我必须在 make 文件中更改以下内容才能与 Make_381 兼容:
之前:
ARDUINO_BASE_DIR = C:\programs/arduino
现在:
ARDUINO_BASE_DIR = \\程序/arduino
I had to change the following in my make file to be compatible with Make_381:
before:
ARDUINO_BASE_DIR = C:\programs/arduino
now:
ARDUINO_BASE_DIR = \\programs/arduino
如果您在 Windows 下运行 Eclipse C/C++ 并引用来自 Cygwin 的文件,请尝试此操作,请确保 c:/cygwin/bin 或 c:/cygwin64/bin 位于 Windows 路径环境中您首选的编译器工具之后。
例子:
路径 = ;C:\yagarto\bin;C:\yagarto-tools\bin;C:\cygwin64\bin;
进行更改后,退出 Eclipse 并重新启动以使其生效(仅重新启动 Eclipse 而不退出并不能解决问题。
Try this if you're running Eclipse C/C++ and referencing files from Cygwin under Windows, make sure c:/cygwin/bin or c:/cygwin64/bin comes after your preferred compiler tools in your Windows Path environment.
Example:
Path = ;C:\yagarto\bin;C:\yagarto-tools\bin;C:\cygwin64\bin;
After making the changes, exit Eclipse and restart for it to take effect (simply restarting Eclipse without exiting won't fix the problem.
在我的项目中,obj 文件夹可能已损坏,并且我收到此错误。 手动删除obj文件夹。 然后 ndk-build 顺利完成。
In my project, obj folder was probably corrupted and I was getting this error. Manually deleted obj folder. Then ndk-build completed fine.