diff --git a/NEWS.md b/NEWS.md index 3ba8bb18..3c6da6ba 100644 --- a/NEWS.md +++ b/NEWS.md @@ -16,6 +16,7 @@ Red Panda C++ Version 1.0.3 - fix: can't build project that has source files in subfolders - fix: can't build project that has custom object folder - fix: buttons in the project option dialog's output page don't work + - fix: don't add non-project header files to makefile's object rules Red Panda C++ Version 1.0.2 - enhancement: press tab in column mode won't exit column mode diff --git a/RedPandaIDE/compiler/projectcompiler.cpp b/RedPandaIDE/compiler/projectcompiler.cpp index 8bd8b1df..5f55c4b5 100644 --- a/RedPandaIDE/compiler/projectcompiler.cpp +++ b/RedPandaIDE/compiler/projectcompiler.cpp @@ -343,7 +343,13 @@ void ProjectCompiler::writeMakeObjFilesRules(QFile &file) continue; if (!parser->isSystemHeaderFile(headerName) && ! parser->isProjectHeaderFile(headerName)) { - objStr = objStr + ' ' + genMakePath2(extractRelativePath(mProject->makeFileName(),headerName)); + for (int j = 0;junits().count();j++) { + PProjectUnit unit2 = mProject->units()[j]; + if (unit2->fileName()==headerName) { + objStr = objStr + ' ' + genMakePath2(extractRelativePath(mProject->makeFileName(),headerName)); + break; + } + } } } } else {