Mac and Windows difference header path (/ vs \)
I have a Windows project that also works on XCode. But I had to changed all the source header paths like
This is quite annoying and I might have to reverse the process for Visual Studio later. How can others solve this problem?
You should be able to use Adapter/EngineAdapterFactory.hpp on both platforms.
(At least that's the case with GCC on Windows.)
Actually, that's not just the trait of compilers - even with Windows Explorer you should be able to navigate with / as directory separator. Open up Explorer and insert in your address bar something like: c:/Some/Folder/Structure. Should work flawlessly unless you're on a really old Windows version (I can confirm it working on XP and up, but probably it's there even longer). Thanks, Microsoft, for being compatible! :)
You should never use \ in a include path, and its not a matter of platform but language (6.4.7/3 from the C99 standard) :
If the characters ', \, ", //, or /* occur in the sequence between the < and > delimiters, the behavior is undefined. Similarly, if the characters ', \, //, or /* occur in the sequence between the " delimiters, the behavior is undefined.
Although some compilers may accept \ in an include path, they are all required to accept /.