diff --git a/NEWS.md b/NEWS.md index 727059c3..c98a1927 100644 --- a/NEWS.md +++ b/NEWS.md @@ -145,6 +145,7 @@ Red Panda C++ Version 2.27 - enhancement: sdcc project compiler: compile source file in subfolders. - fix: project options -> compiler set -> static link & auto convert charset options not correctly loaded. - change: Don't generate project resource files for sdcc project. + - fix: Name of the macro for project private resource header is not correct. Red Panda C++ Version 2.26 - enhancement: Code suggestion for embedded std::vectors. diff --git a/RedPandaIDE/project.cpp b/RedPandaIDE/project.cpp index 315cf4dd..091b1e13 100644 --- a/RedPandaIDE/project.cpp +++ b/RedPandaIDE/project.cpp @@ -1581,8 +1581,11 @@ void Project::buildPrivateResource() // create private header file QString hFile = changeFileExt(rcFile, H_EXT); contents.clear(); - QString def = extractFileName(rcFile); + QString def = extractFileName(hFile); def.replace(".","_"); + def = def.toUpper(); + if (def.front().isDigit()) + def = "PROJECT_"+def; contents.append("/* THIS FILE WILL BE OVERWRITTEN BY Red Panda C++ */"); contents.append("/* DO NOT EDIT ! */"); contents.append("");