I have a project with several folders:
folderA: header1.h header2.h
folderB: header1.h(modified) file1.cpp (includes header1.h and header2.h)
I want to write a Makefile that uses the header1.h
from folderB
and header2.h
from folderA
.
But if I write my Makefile this way:
LOCAL_C_INCLUDES += \
folderA\
Then I have errors at compiling saying some values are defined twice
, even if the header files start with #pragma once
.
Any idea how to achieve that?
I have also tried listing explicitly the header files in the makefile but it does not seem to work.
#pragma once
the head file should not be included twice, I don't think it's the makefile reason, did you check your source code? – A Lan