Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am getting error in subdir.mk file, when I build my Open CV project, after building in Console I am getting the below errors plus warning,I am using OpenCV2.0.
**** Build of configuration Debug for project testing ****

 make all
 Building file: ../main.cpp
 Invoking: Cygwin C++ Compiler
  g++ -I"C:\OpenCV2.0 -I"C:\android programs\testing" -O0 -g3 -Wall -c -fmessage- length=0 -MMD -MP -MF"main.d" -MT"main.d" -o"main.o" "../main.cpp"
 /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
 /bin/sh: -c: line 1: syntax error: unexpected end of file
  subdir.mk:18: recipe for target `main.o' failed
  make: *** [main.o] Error 1


Ok, i am showing the content, means the code of "subdir.mk" file
################################################################################
# Automatically-generated file. Do not edit!
################################################################################

# Add inputs and outputs from these tool invocations to the build variables 
CPP_SRCS += \
../main.cpp 

OBJS += \
./main.o 

CPP_DEPS += \
./main.d 


# Each subdirectory must supply rules for building sources it contributes
%.o: ../%.cpp
	@echo 'Building file: $<'
	@echo 'Invoking: Cygwin C++ Compiler'
	g++ -I"C:\OpenCV2.0 -I"C:\OpenCV2.0\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<"
	@echo 'Finished building: $<'
	@echo ' '
Posted
Updated 14-Jan-13 1:05am
v3
Comments
Richard MacCutchan 14-Jan-13 7:00am    
There is an error in your make file so you need to show us the contents.
PIR FAHIM SHAH 14-Jan-13 7:03am    
@Richard MacCutchan ! above is my subdir.mk file.

1 solution

g++ -I"C:\OpenCV2.0 -I"C:\OpenCV2.0\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<"

There is a double quote character missing after C:\OpenCV2.0.
 
Share this answer
 
Comments
PIR FAHIM SHAH 14-Jan-13 7:40am    
@Richard MacCutchan: I include the code as
g++ -I"C:\OpenCV2.0" -I"C:\OpenCV2.0\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<"

but it still shows the previous error, and when i edit the file and make it build then my edit work is disappear, please give me correct code for above two line, and after edition what should i do, whether i should build or something other,please please
Richard MacCutchan 14-Jan-13 7:47am    
I do not know how you are creating this file, but from the comment at the beginning it would appear to be auto generated by some tool. I can only conclude that either the tool is broken or the inputs to the tool are somehow wrong.
PIR FAHIM SHAH 14-Jan-13 8:12am    
@Richard MacCutchan: subdir.mk file is produce when i build my project for first time, but when i got error then i edit it, and then rebuild it. but still the error is not going to vanished
Richard MacCutchan 14-Jan-13 9:01am    
Sorry, but I have no idea how this file is built so I cannot suggest anything.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900