Include header path change from Windows to Linux

user59988 picture user59988 · Feb 21, 2009 · Viewed 8.2k times · Source

I'm porting an application written in C++ from Windows to Linux. I have a problem with the header files path. Windows uses \ and Linux uses /. I am finding it cumbersome to change this in each and every source and header file. Is there some work around?

Answer

Brian Neal picture Brian Neal · Feb 21, 2009

Always use forward slashes in #include paths. It is the compiler's job to map the path to whatever slash/directory scheme the underlying OS supports.