Just wandering, will something like this work?
header
codeCode:#define func(arg) func_(arg) ... static void func_(arg);
Code:#include "header" int main() { func(arg); }
Just wandering, will something like this work?
header
codeCode:#define func(arg) func_(arg) ... static void func_(arg);
Code:#include "header" int main() { func(arg); }
Last edited by wirmius; 05-11-2013 at 06:46 AM.
No. static is essentially an instruction to the linker not to export the symbol from the file in which it is defined. You can't defeat it by a #define, which is processed much earlier (think of the preprocessor as issuing only word processing instructions).
I'm the author of MiniBasic: How to write a script interpreter and Basic Algorithms
Visit my website for lots of associated C programming resources.
https://github.com/MalcolmMcLean