Cygwin make error : *** target pattern contains no `%'

后端 未结 11 1456
旧巷少年郎
旧巷少年郎 2020-12-08 07:07

I got this error while (re)building, using cygwin make.exe version :3.81.

Error : *** target pattern contains no `%\'.
11条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-08 07:36

    I had the target pattern contains no '%' error while building with the Android NDK using cygwin.

    I found the following link helpful:

    Errors Generated by Make

    • ‘missing target pattern. Stop.’
    • ‘multiple target patterns. Stop.’
    • ‘target pattern contains no `%'. Stop.’
    • ‘mixed implicit and static pattern rules. Stop.’

    These are generated for malformed static pattern rules. The first means there’s no pattern in the target section of the rule; the second means there are multiple patterns in the target section; the third means the target doesn’t contain a pattern character (%); and the fourth means that all three parts of the static pattern rule contain pattern characters (%)–only the first two parts should. If you see these errors and you aren’t trying to create a static pattern rule, check the value of any variables in your target and prerequisite lists to be sure they do not contain colons. See Syntax of Static Pattern Rules.

    And so, my solution included changing my system variables from Windows format to Unix format like so:

    • Instead of 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.

提交回复
热议问题