Dongwook-son / apdfviewer

Automatically exported from code.google.com/p/apdfviewer
GNU General Public License v2.0
0 stars 1 forks source link

How to make new project #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I have install the NDK 5 and also run the test project when i
 Compile project the show the many error of file not found mostly for utils and skia.

What is the expected output? What do you see instead?
 As i search the internet and find out the most best open source lib for android is apdfviewer,can please write the step which lib is need for build new project that will be help-full for newbies 

What version of the product are you using? On what operating system?
I am running on Window 7 with Android 2.2,2.3 and ndk 5.

Thank you very much

Original issue reported on code.google.com by tatva25@gmail.com on 2 May 2011 at 1:58

GoogleCodeExporter commented 9 years ago
Yes can someone please instruct on compiling. Libpoppler seems to be the 
problem. It can't find cutil/log.h and SkCanvas.h and SkPaint.h  .... 

apdfviewer-read-only/jni/../poppler/poppler/Error.h:44:24: error: cutils/log.h: 
No such file or directory

/apdfviewer-read-only/jni/../poppler/poppler/AndroidOutputDev.h:30:22: error: 
SkCanvas.h: No such file or directory
/apdfviewer-read-only/jni/../poppler/poppler/AndroidOutputDev.h:31:21: error: 
SkPaint.h: No such file or directory

I don't know how to tell it where those libraries are, but i imagine that if we 
can get those visible compiling will work. Someone please help... Project Owner 
perhaps

Original comment by dylan.th...@gmail.com on 19 May 2011 at 4:25

GoogleCodeExporter commented 9 years ago
Ok i got a lot further. past the cutils and skCanvas errors. It's a heck of a 
long task but not really complicated. you have to download the android os 
source. That is where the cutils and skia stuff is then you have to create 
links to those directories and place them in  the "external" directory within 
the apdfviewer root dir.
so i have a directory 
apdfviewer-read-only/external
in side of it are three directories/symlinks
cutils => {androidossrc}/system/core/include/cutils
skia => {androidossrc}/external/skia
utils => {androidossrc}/frameworks/base/include/utils

then i need to make sure that the jni/Android.mk points to the right place (i 
made a lot of changes and i'm not sure which ones were added so here is what i 
have:

LOCAL_C_INCLUDES :=             \
        /usr/local/share/android-sdk-linux_x86/src/apdfviewer-read-only/poppler \
        /usr/local/share/android-sdk-linux_x86/src/apdfviewer-read-only/poppler/poppler \
        /usr/local/share/android-sdk-linux_x86/src/apdfviewer-read-only/external/skia/include/core      \
        /usr/local/share/android-sdk-linux_x86/src/apdfviewer-read-only/external/skia/include/config    \
        /usr/local/share/android-sdk-linux_x86/src/apdfviewer-read-only/external        \
        $(JNI_H_INCLUDE)

Ok with all of those changes compiles start.... the problem now looks to be 
that ndk-build isn't building poppler before it trys to build the 
PDFDocument.cc file (the main jni file). I get errors like this: undefined 
reference to `AndroidOutputDev::AndroidOutputDev(SkCanvas*, XRef*)'

This function is defined within poppler/poppler/AndroidOutputDev.h (which file 
i've also included in PDFDocument.cc)
I'll update if i figure out more.

Original comment by dylan.th...@gmail.com on 19 May 2011 at 8:16

GoogleCodeExporter commented 9 years ago
Ok I'm basically at the point where it can't find the libskia so i get errors:
 undefined reference to `SkPaint::

I compiled skia from the ndk samples but when i add the libskia to ndk path i 
get incompatible version... Not really sure what to do now. Any help?

Original comment by dylan.th...@gmail.com on 20 May 2011 at 5:36

GoogleCodeExporter commented 9 years ago
I have had the same problem. I do not know what to do. Please help.

Original comment by shadow28...@gmail.com on 24 May 2011 at 11:44

GoogleCodeExporter commented 9 years ago
This project must be built in an entire android source tree.

Original comment by liwenha...@gmail.com on 10 Jun 2011 at 4:13

GoogleCodeExporter commented 9 years ago
did any tutorial to do this?

Thanks

Original comment by Fadhlan....@gmail.com on 19 Jul 2011 at 1:14

GoogleCodeExporter commented 9 years ago
can you help me get source code android 2.2 ???
help me 

Original comment by ngosylie...@gmail.com on 21 Jul 2011 at 2:17

GoogleCodeExporter commented 9 years ago
You can find Android OS Source Code here 
(http://source.android.com/source/downloading.html), but you have to install 
GIT before getting it. I have just download all in Mac according to the hints, 
there is differences to use it in Window. Besides, this project must be built 
in entire Android OS Source tree thanks to liwenha...@gmail.com

Sadly, so far I still have problem as dylan.th...@gmail.com mentioned even I 
found that "poppler/AndroidOutputDev.h" was included in AndroidOutputDev.cc, 
here is my log:

trunk/obj/local/armeabi/objs/poppler_jni/PDFDocument.o: In function 
`native_init':

trunk/jni/PDFDocument.cc:237: undefined reference to 
`FileStream::FileStream(__sFILE*, unsigned int, int, unsigned int, Object*)'

trunk/jni/PDFDocument.cc:242: undefined reference to 
`PDFDoc::PDFDoc(BaseStream*, GooString*, GooString*, void*)'

trunk/jni/PDFDocument.cc:244: undefined reference to `__android_log_print'
trunk/jni/PDFDocument.cc:239: undefined reference to `__android_log_print'
trunk/jni/PDFDocument.cc:232: undefined reference to `__android_log_print'
trunk/obj/local/armeabi/objs/poppler_jni/PDFDocument.o: In function 
`drawPageSlice':

trunk/jni/PDFDocument.cc:212: undefined reference to 
`AndroidOutputDev::AndroidOutputDev(SkCanvas*, XRef*)'

trunk/jni/PDFDocument.cc:220: undefined reference to 
`PDFDoc::displayPageSlice(OutputDev*, int, double, double, int, int, int, int, 
int, int, int, int, int (*)(void*), void*, int (*)(Annot*, void*), void*)'

trunk/jni/PDFDocument.cc:220: undefined reference to 
`AndroidOutputDev::~AndroidOutputDev()'

trunk/obj/local/armeabi/objs/poppler_jni/PDFDocument.o: In function `drawPages':
/Users/psvn045/WORKING_DIRECTORY/trunk/jni/PDFDocument.cc:188: undefined 
reference to `AndroidOutputDev::AndroidOutputDev(SkCanvas*, XRef*)'

trunk/jni/PDFDocument.cc:196: undefined reference to 
`PDFDoc::displayPages(OutputDev*, int, int, double, double, int, int, int, int, 
int (*)(void*), void*, int (*)(Annot*, void*), void*)'

trunk/jni/PDFDocument.cc:196: undefined reference to 
`AndroidOutputDev::~AndroidOutputDev()'

trunk/obj/local/armeabi/objs/poppler_jni/PDFDocument.o: In function `drawPage':
/Users/psvn045/WORKING_DIRECTORY/trunk/jni/PDFDocument.cc:162: undefined 
reference to `AndroidOutputDev::AndroidOutputDev(SkCanvas*, XRef*)'

trunk/jni/PDFDocument.cc:169: undefined reference to `__android_log_print'
/Users/psvn045/WORKING_DIRECTORY/trunk/jni/PDFDocument.cc:172: undefined 
reference to `PDFDoc::displayPage(OutputDev*, int, double, double, int, int, 
int, int, int (*)(void*), void*, int (*)(Annot*, void*), void*)'

trunk/jni/PDFDocument.cc:172: undefined reference to 
`AndroidOutputDev::~AndroidOutputDev()'

trunk/obj/local/armeabi/objs/poppler_jni/PDFDocument.o: In function 
`native_class_init':

trunk/jni/PDFDocument.cc:264: undefined reference to 
`GlobalParams::GlobalParams(char const*)'

trunk/jni/PDFDocument.cc:266: undefined reference to `globalParams'
collect2: ld returned 1 exit status

make: *** [trunk/obj/local/armeabi/libpoppler_jni.so] Error 1

COULD YOU TELL ME WHAT TO DO?

Original comment by phuong.h...@gmail.com on 18 Aug 2011 at 4:09

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have same problem!
Is there an issue?

Original comment by adry...@gmail.com on 3 Oct 2012 at 9:52