Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Android OpenCV
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 14-Jan-13 0:20am
Edited 14-Jan-13 2:05am
v3
Comments
Richard MacCutchan at 14-Jan-13 7:00am
   
There is an error in your make file so you need to show us the contents.
PIR FAHIM SHAH at 14-Jan-13 7:03am
   
@Richard MacCutchan ! above is my subdir.mk file.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

	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.
  Permalink  
Comments
PIR FAHIM SHAH at 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 at 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 at 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 at 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)

  Print Answers RSS
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,327
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,920


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 14 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100