c - Eclipse + CDT + Cygwin: How do you fix the "Multiple targets" bug? -


update 1: original post long , obscured real problem. have discovered causing "multiple targets" bug when make called.

update 2: found out 'multiple targets' bug caused gnu make version 3.8.1 (see here1 , here2). gnu make 3.8.1 current gnu make released cygwin. summarize link: old v3.8.0 handled windows paths fine , newer v3.8.1 reports errors windows paths (maybe it's passive aggressive jab fsf?).


when start new project in eclipse+cdt+cygwin w/o external includes/libraries, works fine me.

as try use external include/library "multiple targets" bug.

here steps needed reproduce bug on windows+eclipse+cdt+cygwin:

  1. project project properties --> c/c++ build --> settings --> tool settings --> cygwin c compiler --> includes --> include paths (-i) -- > add button --> pick directory --> "c:\dir1\dir2"
  2. i hit build.
  3. it builds no errors first time.
  4. i hit build again... build errors "multiple targets. stop.".
  5. i click on error.

eclipse pulls makefile. error happens when make sees windows path new include file external library:

# note: error happens when first "c:/" occurs src/main.d src/main.o: ../src/main.c c:/dir1/dir2/externallibrary.h 

the reason make getting error "multiple targets" because sees ":" part of make syntax declaring target. when there 2 ":", make errors out because doesn't know "multiple targets."


i can not edit makefiles manually because regenerated , overwritten [update: eclipse-cdt]. given can't manually edit makefile.

  1. is there way eclipse not use "c:\" path? or tell make ignore "c:\" path?
  2. is eclipse+cdt+cygwin bug?
  3. if use eclipse+cdt+cygwin... please lend hand (i don't want use visual studios...)! maybe using eclipse+cdt+cygwin wrong? how external library includes work?

*very frustrated*

trying stay open-source , cross-platform user,

trevor

turns out "multiple targets" issue caused current version of gnu make installed cygwin. gnu make 3.8.1 current gnu make released cygwin.

the gnu make 3.8.1 not handle windows paths contain "c:\". every time make file has windows path "c:\" build error "multiple targets".

the solution ended doing download fixed gnu make v3.8.1. see here1 or here2. eclipse+cdt+cygwin worked fine again.

update (05-feb-2015): updated cygwin , new make (4.0.x) problem goes away. https://superuser.com/questions/154418/where-do-i-get-make-for-cygwin


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -