I am developing a multi-platform application and in one component I have a class method called DrawText. Unfortunately, I get a linker error (on windows only) saying that there is an unresolved external symbol for a DrawTextW method of this class.
I’ve seen this before with other methods ending in “Text” where it is looking for either a FooTextW or FooTextA method instead of the FooText method I defined. My assumption is that somewhere in the Windows headers there is a macro definition assigning FooText to FooTextW or FooTextA based on some other definition.
Aside from renaming my function (which is what I did in the past), does anybody have any good ideas for getting around this issue?
Thanks.
Joe
Yes, this is a real problem with using Windows, and there’s no way to turn it off since the headers all look like this:
So you’re going to get the symbol defined either way. It would be very nice if you could #define something before #include’ing windows.h that turns this behavior off, but alas none exists.