This has actually occurred twice now. I’m writing a cross-platform application, and some of my function names conflict with the Windows API. What I did (for example with LoadObject) was…
#undef GetObject
Is this an okay approach, or should I rename my functions?
If you intend for your code to be used alongside of the Windows API, I’d recommend renaming the functions. Yes, that’s a hassle, but it’s (in my opinion) better than undefining parts of the Windows API, even if you don’t use those parts (someone else using your code might need to use those parts).