Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
259 views
in Technique[技术] by (71.8m points)

c++ - Include header path change from Windows to Linux

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...