1

几周以来,我一直在尝试使用 Mupdf 运气,但无法构建 .so 文件。我现在只是在 cygwin 上尝试“Make”,我之前没有尝试过,浪费了我的时间。

为了构建 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 functionwintitle':/ 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 functionwindrawstringxor的引用':/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: 未定义引用_XGetGCValues'/cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/ _XFlush' /cygdrive/d/Users/MOBDEV3/workspace1/Latest_Mupdf/jni/apps/x11_main.c:442: undefined reference tox11_main.c:444: 未定义引用_XChangeGC' build/debug/x11_main.o: In functionwindrawstring':/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 functionmain'的引用:/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 functioncreateximage的引用':/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 functionmake_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 的构建/调试/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 functionximage_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 functionximage_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 functionximage_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”中,但无法做到。任何帮助表示赞赏...

4

1 回答 1

3

尝试带有参数的 make 命令 例如,

使 NOX11=是

于 2012-06-26T17:06:50.150 回答