I have a .pch file which is required to compile a c++ file. I am using Android NDK to make a library out of few c++ files and then use it in my Java programs to call library functions. Can anyone tell how or where to include .pch files so that compiler can recognize it.
Asked
Active
Viewed 2,829 times
9
-
1see http://stackoverflow.com/questions/5150778/how-to-use-precompiled-headers-in-android-ndk-project – mooncheese Mar 18 '13 at 08:04
1 Answers
0
Usually pch files are generated by compilers to speed up compile time. These files are not compulsory.
You should be able to build your library without using it.
However, if you absolutely need it, take a look at http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html
One more thing : "pch" files are either generated by Visual or XCode, as far as I know. If you want to use a precompiled header with the NDK, you might need to regenerate it using g++ (with -x option) to output a "gch" file, that will be recognize by the NDK.

rockeye
- 2,765
- 2
- 30
- 44