Very simple application fails with multiple target patterns from Eclipse
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.
multiple target patterns Makefile error
I had it on the Makefile
MAPS+=reverse/db.901:550:2001.ip6.arpa
lastserial: ${MAPS}
./updateser ${MAPS}
It's because of the :
in the file name.
I solved this with
-------- notice
/ /
v v
MAPS+=reverse/db.901\:550\:2001.ip6.arpa
lastserial: ${MAPS}
./updateser ${MAPS}
Eclipse + CDT + Cygwin: How do you fix the Multiple targets bug?
Turns out the "multiple targets" issue is caused by the current version of GNU Make installed from Cygwin. GNU Make 3.8.1 is the current GNU Make released with Cygwin.
The GNU Make 3.8.1 does not handle windows paths that contain "C:\". So every time your make file has a windows path with "C:\" you get a build error "multiple targets".
The solution I ended up doing is to download a fixed GNU Make v3.8.1. See Here1 or Here2. Then Eclipse+CDT+Cygwin worked fine again.
Update (05-feb-2015):
With an updated cygwin and a new Make (4.0.x) then the problem goes away.
https://superuser.com/questions/154418/where-do-i-get-make-for-cygwin
Make: *** multiple target patterns. Stop
I've figured out that I can run the project inside Eclipse, only if I manually clean it before each run. Also, the builds are successful if I manually clean it before each build. I will look into creating a custom script for compilation after I submit this assignment.
Multiple target patterns?
Quoting from an existing answer since you might have the same issue
"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".
application fails with multiple targets from eclipse
Failing to install Jekyll gem native extension on Windows with multiple target patterns
Ok just a try. The Makefile on this line (and following) defines the target for .m.o.
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
Everything looks ok if you're using mingw / cygwin, but INCFLAGS can make problems on window machines, if you've installed ruby in a directory with spaces.
INCFLAG is defined as INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
and if you see my definition below there is no space in any path.
topdir = /C/Ruby200-x64/include/ruby-2.0.0
hdrdir = $(topdir)
arch_hdrdir = C:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32
If I change the ruby installation to a path with spaces I get invalid option error in native windows command line and in the mingw session. Maybe this is could help.
Getting Multiple Target Patterns. Stop. error when attempting to build for Android with ndk-build
You should remove old "obj" folder.
NoClassDefFoundError for Play app with sbt using Eclipse
I have found a solution through further trial and error. Instead of extending the classpath to "target/scala-2.11/classes_managed"
it should be extended to "target/scala-2.11/classes"
. In other words the line in build.sbt
should be
unmanagedJars in Compile += ( baseDirectory.value / "target/scala-2.11/classes" )
Now from sbt I can compile, test and run the application, and connect successfully to localhost:9000, and I can also open the files in Eclipse without seeing error lines.
I still don't know why the NoClassDefFoundError really occurred in the previous setup, but that's a problem for another day.
Related Topics
Free Function Versus Member Function
Getting the Size of a C++ Function
Correct Format for Http Post Using Qnetworkrequest
Can a Variable Be Declared Both Static and Extern
Cuda Linking Error - Visual Express 2008 - Nvcc Fatal Due to (Null) Configuration File
How to Use C++14 Features When Building Qmake Projects
Recursion in C++ Factorial Program
How to Use Unordered_Set with Custom Types
Sorting a Vector of Objects by a Property of the Object
Is Using Unsigned Integer Overflow Good Practice
Std::Remove_If - Lambda, Not Removing Anything from the Collection
How Serious Is the New/Delete Operator Mismatch Error
How to Implement a Map with Different Data Types as Values
Iterator Adapter to Iterate Just the Values in a Map
How to Recursively Create a Folder in Win32
Why Is the Copy Constructor Called When We Pass an Object as an Argument by Value to a Method
Output Redirection Using Fork() and Execl()
Is It Safe to Reinterpret_Cast an Enum Class Variable to a Reference of the Underlying Type