Search code examples
makefilecygwineclipse-cdt

Make: *** multiple target patterns. Stop


I'm currently working on an introductory C++ project, using Eclipse Juno, with CDT and Cygwin C++. I'm using an MVC architecture and have just gotten the code to a point where I can run the executable and see some results. When I build the application, the compiler doesn't throw any errors; however, when I run the application through Eclipse, the application rebuilds and displays the following error:

make: *** multiple target patterns.  Stop.  GasFinderTUI.d KyleGasStationFinder/Debug/src/View  line 1  C/C++ Problem

Here is my code from that file:

src/Controller/GasFinderController.d src/Controller/GasFinderController.o:  \
 ../src/Controller/GasFinderController.cpp \
  ../src/Controller/GasFinderController.h \
  C:/Users/Kyle/Dropbox/Workbench/KyleGasStationFinder/src/Model/LocalGasStations.h \
  C:/Users/Kyle/Dropbox/Workbench/KyleGasStationFinder/src/Model/GasStation.h \
  C:/Users/Kyle/Dropbox/Workbench/KyleGasStationFinder/src/Model/GasPump.h \
  C:/Users/Kyle/Dropbox/Workbench/KyleGasStationFinder/src/Model/Utilities.h

../src/Controller/GasFinderController.h:

C:/Users/Kyle/Dropbox/Workbench/KyleGasStationFinder/src/Model/LocalGasStations.h:

C:/Users/Kyle/Dropbox/Workbench/KyleGasStationFinder/src/Model/GasStation.h:

C:/Users/Kyle/Dropbox/Workbench/KyleGasStationFinder/src/Model/GasPump.h:

C:/Users/Kyle/Dropbox/Workbench/KyleGasStationFinder/src/Model/Utilities.h:

I've tried cleaning and rebuilding, without using the run function, and the application builds cleanly. I've also run the actual .exe file without Eclipse, and the application runs as expected. Although running the application separately from Eclipse is an acceptable substitute, I'll be writing several applications in C++ in the near future and would appreciate the ability to execute from Eclipse. These applications will also be examined and graded using Eclipse and I'm sure my instructor would also like this convenience.

I've looked at this question which recommends changing the C:/ for either a relative path name, or /cygwin/c/. My other .d files, as well as my include paths, utilize a relative path and those files pose no issue. Although I believe both of these solutions would work, the .d file is recreated for every compilation. All changes that I've made have been overwritten upon every build.

Does Eclipse and/or Cygwin C++ contain any settings that might allow me to prevent this complication from occurring in the future?


Solution

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