Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ndkbuild error: ISO C++ forbids initialization of member 'pdfDocument' #13

Open
lrhehe opened this issue Nov 4, 2016 · 1 comment
Open

Comments

@lrhehe
Copy link

lrhehe commented Nov 4, 2016

when cd to .../src/main/jni and run ndkbuild, got error:

/src/main/jni/src/mainJNILib.cpp:48:33: error: ISO C++ forbids initialization of member 'pdfDocument' [-fpermissive]
/src/main/jni/src/mainJNILib.cpp:48:33: error: making 'pdfDocument' static [-fpermissive]
/src/main/jni/src/mainJNILib.cpp:48:33: error: invalid in-class initialization of static data member of non-integral type 'FPDF_DOCUMENT {aka void*}'
@lrhehe
Copy link
Author

lrhehe commented Nov 4, 2016

solved by:

+++ b/src/main/jni/src/mainJNILib.cpp
@@ -45,7 +45,7 @@ class DocumentFile {
     int fileFd;

     public:
-    FPDF_DOCUMENT pdfDocument = NULL;
+    FPDF_DOCUMENT pdfDocument;

refer: http://stackoverflow.com/a/20310041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant