autofix-undeclared-identifier
Fixes 'undeclared identifier' errors by adding missing
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Fixes 'undeclared identifier' errors by adding missing
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | autofix-undeclared-identifier |
| description | Fixes 'undeclared identifier' errors by adding missing |
Fixes errors where a symbol is used but not declared in the current scope.
use of undeclared identifier 'X''X' was not declared in this scopeerror: 'X' undeclaredParse the error message to extract the undeclared identifier.
Common C++ standard library symbols:
| Symbol | Header | Namespace |
|---|---|---|
vector | <vector> | std:: |
string | <string> | std:: |
cout, cin, endl | <iostream> | std:: |
map, unordered_map | <map>, <unordered_map> | std:: |
unique_ptr, shared_ptr | <memory> | std:: |
thread, mutex | <thread>, <mutex> | std:: |
LOG, ALOG* | <android/log.h> | - |
If not a standard symbol, search the codebase:
grep -r "class X" --include="*.h"
grep -r "struct X" --include="*.h"
grep -r "#define X" --include="*.h"
Add the appropriate #include at the top of the file:
#include <vector> // For std::vector
#include "project/MyClass.h" // For project symbols
Or add namespace qualifier:
std::vector<int> items; // Instead of: vector<int> items;
Comprehensive build error repair tool for C++, Rust, and Java projects using Soong, GN, Make, or CMake. Automatically fixes 30+ types of errors including headers, linking, APIs, and config.
Fixes function call errors with wrong number or type of arguments.
Fixes type mismatch errors by adding appropriate casts or conversions.
Fixes syntax errors in Android.bp files.
Removes unsupported or unknown compiler flags from build configurations.
Fixes scope and variable errors in BUILD.gn files.