我已经在Mupdf上试了好几个星期,但是无法构建.so文件。 我只是在尝试"让"现在在cygwin上,我之前没有尝试过,浪费了我的时间。
要为Mupdf构建so文件,我正在做的是,只需在导入所需的所有主要文件后在cygwin终端上编写一个简单的命令,cmd就是:make -f Makefile。
现在我的所有文件都是逐个构建和链接的,除了两个文件。我得到的错误是:
LINK build / debug / mupdf
build / debug / x11_main.o:在函数winopen':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:127: undefined reference to
_ XOpenDisplay'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:131:对_XInternAtom'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:132: undefined reference to
_ XInternAtom'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:133:对_XInternAtom'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:134: undefined reference to
_ XInternAtom'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:135:对_XInternAtom'
build/debug/x11_main.o:/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:136: more undefined references to
_ XInternAtom'的未定义引用跟随
build / debug / x11_main.o:在函数winopen':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:142: undefined reference to
_ XCreateFontCursor'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:143:未定义引用_XCreateFontCursor'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:144: undefined reference to
_ XCreateFontCursor'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:154:对_XAllocColor'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:155: undefined reference to
_ XAllocColor'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:157:对_XCreateWindow'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:167: undefined reference to
_ XSetWindowColormap'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:168:对_XSelectInput'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:174: undefined reference to
_ XCreateGC'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:176:对_XDefineCursor'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:178: undefined reference to
_ XAllocWMHints'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:182:对_XCreateBitmapFromData'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:186: undefined reference to
_ XCreateBitmapFromData'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:194:未定义引用_XSetWMHints'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:196: undefined reference to
_ XFree'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:199:对_XAllocClassHint'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:204: undefined reference to
_ XSetClassHint'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:205:对_XFree'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:208: undefined reference to
_ XSetWMProtocols'的未定义引用
build / debug / x11_main.o:在函数wincursor':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:227: undefined reference to
_ XDefineCursor'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:229:未明确引用_XDefineCursor'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:231: undefined reference to
_ XDefineCursor'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:232:未明确引用_XFlush'
build/debug/x11_main.o: In function
wintitle':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:237:对_XStoreName'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:239: undefined reference to
_ Xutf8SetWMProperties'的未定义引用
build / debug / x11_main.o:在函数winresize':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:260: undefined reference to
_ XConfigureWindow'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:272:对_XMapWindow'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:273: undefined reference to
_ XFlush'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:277:对_XNextEvent'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:287: undefined reference to
_ XSetForeground'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:288:对_XFillRectangle'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:289: undefined reference to
_ XFlush'的未定义引用
build / debug / x11_main.o:在函数winfullscreen':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:314: undefined reference to
_ XSendEvent'
build / debug / x11_main.o:在函数fillrect':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:322: undefined reference to
_ XFillRectangle'
build / debug / x11_main.o:在函数winblitsearch':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:331: undefined reference to
_ XSetForeground'
build / debug / x11_main.o:在函数winblit':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:348: undefined reference to
_ XSetForeground'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:354:对_XSetForeground'
build/debug/x11_main.o: In function
windrawstringxor'的未定义引用:
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:432:对_XGetGCValues'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:435: undefined reference to
_ XChangeGC'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:437:对_XSetForeground'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:439: undefined reference to
_ XDrawString'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:440:对_XFlush'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:442: undefined reference to
_ XGetGCValues'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:444:对_XChangeGC'
build/debug/x11_main.o: In function
windrawstring'的未定义引用:
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:449:对_XSetForeground'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:450: undefined reference to
_ XDrawString'的未定义引用
build / debug / x11_main.o:在函数windocopy':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:478: undefined reference to
_ XSetSelectionOwner'
build / debug / x11_main.o:在函数onselreq':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:506: undefined reference to
_ XChangeProperty'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:513:对_XChangeProperty'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:520: undefined reference to
_ XChangeProperty'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:530:未明确引用_XSendEvent'
build/debug/x11_main.o: In function
main':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:683:对_XNextEvent'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:704: undefined reference to
_ XLookupString'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:681:未定义引用_XPending'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:800: undefined reference to
_ XPending'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:842:对_XDestroyWindow'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:844: undefined reference to
_ XFreePixmap'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:846:对_XFreeCursor'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:847: undefined reference to
_ XFreeCursor'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:848:对_XFreeCursor'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:850: undefined reference to
_ XFreeGC'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:852:对_XCloseDisplay'
build/debug/x11_image.o: In function
createximage'的未定义引用:
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:108:对_XShmQueryExtension'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:113: undefined reference to
_ XShmCreateImage'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:139:对_XShmAttach'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:148: undefined reference to
_ XSync'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:157:对_XCreateImage'
build/debug/x11_image.o: In function
make_colormap'的未定义引用:
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:194:对_XCreateColormap'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:198: undefined reference to
_ XStoreColors'的未定义引用
build / debug / x11_image.o:在函数next_pool_image':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:307: undefined reference to
_ XSync'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:309:未定义引用_XFlush'
build/debug/x11_image.o: In function
ximage_error_handler':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:322:对_XGetErrorText'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:328: undefined reference to
_ XSetErrorHandler'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:329:对_XSetErrorHandler'
build/debug/x11_image.o: In function
ximage_init'的未定义引用:
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:351:对_XVisualIDFromVisual'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:352: undefined reference to
_ XGetVisualInfo'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:355:对_XFree'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:359: undefined reference to
_ XFree'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:362:对_XListPixmapFormats'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:369: undefined reference to
_ XFree'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:382:对_XQueryExtension'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:383: undefined reference to
_ XShmQueryExtension'的未定义引用
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:387:未定义引用_XSetErrorHandler'
build/debug/x11_image.o: In function
ximage_blit':
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:452:未定义引用_XShmPutImage'
/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_image.c:458: undefined reference to
_ XPutImage'
collect2:ld返回1退出状态
Makefile:146:目标`build / debug / mupdf'的配方失败
make: * [build / debug / mupdf]错误1
问题在于" X11 Lib"正如我所见,但无法做到。 任何帮助表示赞赏...
答案 0 :(得分:3)
尝试使用参数For make,
的make命令使NOX11 =是