autofix-multiple-def
Fixes 'multiple definition' linker errors by removing duplicate symbols.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Fixes 'multiple definition' linker errors by removing duplicate symbols.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
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.
استنادا إلى تصنيف SOC المهني
| name | autofix-multiple-def |
| description | Fixes 'multiple definition' linker errors by removing duplicate symbols. |
Fixes linker errors where the same symbol is defined in multiple translation units.
multiple definition of 'X'already defined induplicate symbolFrom: multiple definition of 'globalVar'; first defined in a.o
Global variable in header:
// Wrong: header.h
int globalVar = 0; // Defined in every .cpp that includes
// Fix Option 1: extern declaration
// header.h
extern int globalVar;
// source.cpp
int globalVar = 0;
// Fix Option 2: inline (C++17)
inline int globalVar = 0;
Function defined in header:
// Wrong
void foo() { ... } // in header
// Fix: make inline
inline void foo() { ... }
Same source compiled twice: Check build file for duplicate source file entries.