Very simple application fails with “multiple target patterns” from Eclipse

前端 未结 9 858
-上瘾入骨i
-上瘾入骨i 2020-12-01 21:33

Since I\'m more comfortable using Eclipse, I thought I\'d try converting my project from Visual Studio. Yesterday I tried a very simple little test. No matter what I try,

相关标签:
9条回答
  • 2020-12-01 22:26

    according to other internet sources this is related to a problem that cygwin make has with windows path names, specially the c:. For me it workes fine with setting relative paths instead.

    e.g. if you have something like

    proj/mymodule/headers/afile.h
    proj/mymodule/source/abc/afile.c
    

    just add ../mymodule/headers/ as include path in the project configuration for the compiler this will find the header afile.h and will generate make files with relative path. (compiler command will have the statement -I../mymodule/headers/ )

    looks like execution directory is always the project base directory.

    0 讨论(0)
  • 2020-12-01 22:30

    Are you working from a Cygwin installation?

    I've seen this problem before using Cygwin--basically, make sees the : in the path and thinks it is another target definition, hence the error.

    If you are working from a Cygwin installation, you might try replacing the c:/ with /cygdrive/c/. If not, you might try using relative paths or using a network mount and see if that fixes it.

    0 讨论(0)
  • 2020-12-01 22:35

    One change that worked for me (I use Cygwin and SSH terminal into an SVN server in parallel) was to delete the .d files. When I called the make -f makefile from Cygwin, it broke something. I usually compile from the Putty terminal, and after deleting the .d files from my project it stopped complaining about the multiple targets.

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