E
Eric
I've got a pretty large C program with global variables and function
names strewn about (i.e. no "static" declarations in front of them).
Now I want to expose the ability for user's to supply their own shared
object / dll code which will link with my large ugly program.
Problem: naming collisions.
If my program has:
void common_function_name (void)
{
....
}
and now the caller has a similar function, they will get a link error.
What I really would like to do is "mangle" all of my names
intentionally, once I've built my code, except for those few functions
that are legitimate entry points back into my code that the caller
will need.
Thought about wrapping all my code in a namespace and compiling in C++
but this doesn't appear feasible now that I've tried it (many errors).
The other method would be to do a bunch of code conversion, which is
highly risky.
Thoughts?
names strewn about (i.e. no "static" declarations in front of them).
Now I want to expose the ability for user's to supply their own shared
object / dll code which will link with my large ugly program.
Problem: naming collisions.
If my program has:
void common_function_name (void)
{
....
}
and now the caller has a similar function, they will get a link error.
What I really would like to do is "mangle" all of my names
intentionally, once I've built my code, except for those few functions
that are legitimate entry points back into my code that the caller
will need.
Thought about wrapping all my code in a namespace and compiling in C++
but this doesn't appear feasible now that I've tried it (many errors).
The other method would be to do a bunch of code conversion, which is
highly risky.
Thoughts?