9

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.

1

1 Answer 1

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.