autofix-symbol-dep
Fixes linker 'undefined reference' errors by finding and adding the library dependency.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Fixes linker 'undefined reference' errors by finding and adding the library dependency.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
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.
| name | autofix-symbol-dep |
| description | Fixes linker 'undefined reference' errors by finding and adding the library dependency. |
Fixes linker errors where symbols cannot be resolved.
undefined reference to 'X'unresolved external symbol X (MSVC)ld.lld: error: undefined symbol: XFrom: undefined reference to '_ZN5MyApp10initializeEv'
Demangle: MyApp::initialize()
Search for the symbol definition:
# Find source files containing the function
grep -r "void MyApp::initialize" --include="*.cpp"
# Or search for class definition
grep -r "class MyApp" --include="*.h"
Then find which build target compiles that source file.
GN (BUILD.gn):
deps = [
"//path/to:my_library",
]
Soong (Android.bp):
shared_libs: ["libmyapp"],
// or
static_libs: ["libmyapp"],
CMake:
target_link_libraries(my_target PRIVATE my_library)
Re-run the linker or full build to confirm resolution.
| Symbol Pattern | Library |
|---|---|
android:: | libutils, libcutils |
AudioFlinger | libaudioflinger |
binder:: | libbinder |