However, I'd also like the library to function perfectly in C++ without requiring the library user to do a ton of casting.
This brings me to one of two solutions:
1) Overload every function that expects the base struct if using a C++ compiler.
2) use inheritance in C++, just make the base struct the first data member in C
#2 seems like the most attractive choice, just due to the number of functions involved. But it also seems as though it could break if the library was initially built in C (or if used in C, would break if the library was initially built in C++), I honestly have no clue.
Answered the question for myself. Sorry, mods can delete or whatever.
[mod edit]We generally don't delete threads, but prefer to leave them around for others to also learn from. If someone answers their own question, it's appreciated when they share their thoughts for the above reason.
Edited by Hodgman, 22 August 2012 - 09:18 PM.