| koba (2) | |
|
In linux platform, I want to build a C++ project that was developed under Visual Studio 2008. It has pre-compiled header named as "stdafx.h", and it has included into all sources via "Forcfed Include File" option of Visual Studio project settting. But I found no way to auto-include "stdafx.h" via gcc. It's tiring that inserting "#include" directive into all sources. I think it's not cool that replacing all sources via sed, perl or something. Is there a better way? | |
|
|
|
| ne555 (4042) | |
|
I don't know about `stdafx.h' or VS08, please explain their behaviour. To include a file you could use the -include file preprocessor option | |
|
|
|
| koba (2) | |
|
Great, I reached the goal! I had been looked for the way by "gcc --help | grep include", and I have not found it. "-include file" option just matches my purpose. "stdafx.h" is a pre-compiled header under VS. "Forcfed Include File" option of VS behaves same as "-include file" option of gcc. I often use this option for including "stdafx.h" into all sources. Your answer made me happy. Thanks, | |
|
|
|