0

在 Redhat Linux 上下载并安装 2.2.1 并尝试编译 text_demo.c,但它抱怨缺少 grid_sheet.h。所以我下载了2.0.8来获取grid_sheet.h。现在,当我尝试编译时,出现以下错误:

gcc -o text_demo -I /usr/local/include I /home/downloads/libharu-2.0.8/demo -L /usr/local/lib text_demo.c

/tmp/ccmPxCcu.o:在函数show_stripe_pattern': text_demo.c:(.text+0x68): undefined reference to HPDF_Page_SetRGBStroke' text_demo.c:(.text+0x7c):未定义对HPDF_Page_SetLineWidth' text_demo.c:(.text+0xa6): undefined reference toHPDF_Page_MoveTo' text_demo.c:(.text+0xd0) 的引用:未定义对HPDF_Page_TextWidth' text_demo.c:(.text+0xe9): undefined reference toHPDF_Page_LineTo' text_demo.c:(.text +0xf4):对 HPDF_Page_SetLineWidth'/tmp/ccmPxCcu.o 的未定义引用HPDF_Page_Stroke' text_demo.c:(.text+0x116): undefined reference to:在函数 show_description': text_demo.c:(.text+0x129): undefined reference to HPDF_Page_GetCurrentFontSize' text_demo.c:(.text+0x137):对HPDF_Page_GetCurrentFont' text_demo.c:(.text+0x14c): undefined reference toHPDF_Page_GetRGBFill' text_demo.c:(.text+0x15a) 的未定义引用 HPDF_Page_BeginText' text_demo.c:(.text+0x180): undefined reference toHPDF_Page_SetRGBFill' text_demo.c:(.text+0x193): 未定义引用HPDF_Page_SetTextRenderingMode' text_demo.c:(.text+0x1ae): undefined reference to HPDF_Page_SetFontAndSize' text_demo.c:(.text+0x1d6): 未定义引用HPDF_Page_TextOut' text_demo.c:(.text+0x1e1): undefined reference toHPDF_Page_EndText' text_demo.c:(.text+0x1fa): 未定义引用HPDF_Page_SetFontAndSize' text_demo.c:(.text+0x21a): undefined reference toHPDF_Page_SetRGBFill'/tmp/ccmPxCcu.o:在函数main': text_demo.c:(.text+0x2ab): undefined reference to HPDF_New'text_demo.c:(.text+0x2ea): 未定义对 HPDF_Free' text_demo.c:(.text+0x30c): undefined reference to HPDF_SetCompressionMode' text_demo.c:(.text+0x327) 的引用:未定义对HPDF_GetFont' text_demo.c:(.text+0x335): undefined reference toHPDF_AddPage' text_demo.c:( .text+0x34a):未定义对print_grid' text_demo.c:(.text+0x365): undefined reference toHPDF_Page_SetFontAndSize 的引用 text_demo.c:(.text+0x377):未定义对HPDF_Page_TextWidth' text_demo.c:(.text+0x385): undefined reference to HPDF_Page_BeginText 的引用 text_demo.c:(.text+0x390):未定义对HPDF_Page_GetHeight' text_demo.c:(.text+0x3a9): undefined reference toHPDF_Page_GetWidth 的引用 text_demo.c:(.text +0x3d4):未定义对HPDF_Page_TextOut' text_demo.c:(.text+0x3df): undefined reference toHPDF_Page_EndText 的引用 text_demo.c:(.text+0x3ea):未定义对HPDF_Page_BeginText' text_demo.c:(.text+0x3f5): undefined reference toHPDF_Page_GetHeight 的引用 text_demo.c:(.text+0x415):未定义对 HPDF_Page_MoveTextPos' text_demo.c:(.text+0x43b): undefined reference toHPDF_Page_SetFontAndSize 的引用 text_demo.c:(.text+0x45c ): 未定义的引用HPDF_Page_MoveTextPos' text_demo.c:(.text+0x47c): undefined reference toHPDF_Page_GetWidth' text_demo.c:(.text+0x4aa): 未定义引用HPDF_Page_MeasureText' text_demo.c:(.text+0x4cd): undefined reference toHPDF_Page_ShowText' text_demo.c:(.text+0x4ea): 未定义引用 HPDF_Page_MoveTextPos' text_demo.c:(.text+0x505): undefined reference toHPDF_Page_SetFontAndSize' text_demo.c:(.text+0x53f): 未定义引用HPDF_Page_ShowText' text_demo.c:(.text+0x57c): undefined reference toHPDF_Page_SetFontAndSize' text_demo.c:(.text+0x599): 未定义对HPDF_Page_MoveTextPos' text_demo.c:(.text+0x5ac): undefined reference toHPDF_Page_ShowText 的引用 text_demo.c:(.text+0x5c7): 未定义对 HPDF_Page_SetFontAndSize' text_demo.c:(.text+0x5e4): undefined reference toHPDF_Page_MoveTextPos 的引用 text_demo.c:(.text+0x665): 未定义对HPDF_Page_SetRGBFill' text_demo.c:(.text+0x67a): undefined reference toHPDF_Page_ShowText 的引用 text_demo。 c:(.text+0x6a3): 未定义对 HPDF_Page_MoveTextPos' text_demo.c:(.text+0x6fe): undefined reference toHPDF_Page_SetRGBFill' 的引用 text_demo.c:(.text+0x713): 未定义对HPDF_Page_ShowText' text_demo.c:(.text+0x73c): undefined reference toHPDF_Page_MoveTextPos' 的引用 text_demo.c:(.text+0x797): 未定义的对HPDF_Page_SetRGBFill' text_demo.c:(.text+0x7ac): undefined reference toHPDF_Page_ShowText' text_demo.c:(.text+0x7c3): 未定义引用HPDF_Page_EndText' text_demo.c:(.text+0x7e6): undefined reference to HPDF_Page_SetFontAndSize' text_demo.c:(.text+0x80c): 未定义引用HPDF_Page_SetRGBFill' text_demo.c:(.text+0x820): undefined reference toHPDF_Page_SetLineWidth' text_demo.c:(.text+0x856): 未定义引用 HPDF_Page_SetTextRenderingMode' text_demo.c:(.text+0x861): undefined reference toHPDF_Page_BeginText' text_demo.c:(.text+0x884): 未定义对HPDF_Page_TextOut' text_demo.c:(.text+0x88f): undefined reference toHPDF_Page_EndText' 的引用 text_demo.c:(.text+0x8cd): 未定义对HPDF_Page_SetTextRenderingMode' text_demo.c:(.text+0x8d8): undefined reference to HPDF_Page_BeginText' 的引用 text_demo.c:(.text+0x903): 未定义对HPDF_Page_TextOut' text_demo.c:(.text+0x90e): undefined reference toHPDF_Page_EndText' text_demo 的引用。 c:(.text+0x94c): 未定义引用HPDF_Page_SetTextRenderingMode' text_demo.c:(.text+0x957): undefined reference toHPDF_Page_BeginText' text_demo.c:(.text+0x982): 未定义引用HPDF_Page_TextOut' text_demo.c:(.text+0x98d): undefined reference toHPDF_Page_EndText' text_demo.c:(.text+0x9c3): 未定义引用HPDF_Page_GSave' text_demo.c:(.text+0x9d6): undefined reference to HPDF_Page_SetTextRenderingMode' text_demo.c:(.text+0x9e1): 未定义引用HPDF_Page_BeginText' text_demo.c:(.text+0xa0c): undefined reference toHPDF_Page_TextOut' text_demo.c:(.text+0xa17): 未定义引用HPDF_Page_EndText' text_demo.c:(.text+0xa45): undefined reference toHPDF_Page_GRestore' text_demo.c:(.text+0xa7b): 未定义引用HPDF_Page_GSave' text_demo.c:(.text+0xa8e): undefined reference toHPDF_Page_SetTextRenderingMode' text_demo.c:(.text+0xa99): 未定义引用 HPDF_Page_BeginText' text_demo.c:(.text+0xac4): undefined reference toHPDF_Page_TextOut' text_demo.c:(.text+0xacf): 未定义引用HPDF_Page_EndText' text_demo.c:(.text+0xafd): undefined reference toHPDF_Page_GRestore' text_demo.c:(.text+0xb33): 未定义引用HPDF_Page_GSave' text_demo.c:(.text+0xb46): undefined reference to HPDF_Page_SetTextRenderingMode' text_demo。 c:(.text+0xb51): 未定义HPDF_Page_BeginText' text_demo.c:(.text+0xb7c): undefined reference to的 HPDF_Page_TextOut 引用 text_demo.c:(.text+0xb87): 未定义HPDF_Page_EndText' text_demo.c:(.text+0xbb5): undefined reference to的 HPDF_Page_GRestore 引用 text_demo.c:(.text+0xbc8): 未定义的引用HPDF_Page_SetTextRenderingMode' text_demo.c:(.text+0xbee): undefined reference to HPDF_Page_SetRGBFill' text_demo.c:(.text+0xc09): undefined reference to HPDF_Page_SetFontAndSize' text_demo.c:(.text+0xc5d): undefined reference toHPDF_Page_BeginText' text_demo.c:(.text+0xc79): undefined reference to cos' text_demo.c:(.text+0xc8a): undefined reference tosin' text_demo.c:(.text+0xcb3): undefined reference to sin' text_demo.c:(.text+0xcc4): undefined reference tocos' text_demo.c:(.text+0xd0a): 未定义对 HPDF_Page_SetTextMatrix' text_demo.c:(.text+0xd1d): undefined reference toHPDF_Page_ShowText' 的引用 text_demo.c:(.text+0xd28): 未定义对HPDF_Page_EndText' text_demo.c:(.text+0xd5e): undefined reference toHPDF_Page_BeginText' 的引用 text_demo.c:(.text+0xdb6): 未定义对tan' text_demo.c:(.text+0xdc7): undefined reference totan' text_demo 的引用。 c:(.text+0xe11): 未定义引用 HPDF_Page_SetTextMatrix' text_demo.c:(.text+0xe24): undefined reference toHPDF_Page_ShowText' text_demo.c:(.text+0xe2f): 未定义引用HPDF_Page_EndText' text_demo.c:(.text+0xe65): undefined reference toHPDF_Page_BeginText' text_demo.c:(.text+0xeac): 未定义引用HPDF_Page_SetTextMatrix' text_demo.c:(.text+0xebf): undefined reference toHPDF_Page_ShowText' text_demo.c: (.text+0xeca): 未定义的引用HPDF_Page_EndText' text_demo.c:(.text+0xf00): undefined reference to HPDF_Page_BeginText' text_demo.c:(.text+0xf47): 未定义引用HPDF_Page_SetTextMatrix' text_demo.c:(.text+0xf5a): undefined reference toHPDF_Page_ShowText' text_demo.c:(.text+0xf65): 未定义引用HPDF_Page_EndText' text_demo.c:(.text+0xfef): undefined reference toHPDF_Page_SetFontAndSize' text_demo.c:(.text+0x1015): 未定义引用HPDF_Page_SetRGBFill' text_demo.c:(.text+0x1020): undefined reference to HPDF_Page_BeginText' text_demo.c:(.text+0x1044): 未定义引用HPDF_Page_TextOut' text_demo.c:(.text+0x104f): undefined reference toHPDF_Page_EndText' text_demo.c:(.text+0x1063): 未定义引用HPDF_Page_SetCharSpace' text_demo.c:(.text+0x106e): undefined reference toHPDF_Page_BeginText' text_demo.c:(.text+0x1092): 未定义引用HPDF_Page_TextOut' text_demo.c:(.text+0x109d): undefined reference toHPDF_Page_EndText' text_demo。 c:(.text+0x10b1): 未定义对HPDF_Page_SetWordSpace' text_demo.c:(.text+0x10bc): undefined reference to HPDF_Page_BeginText 的引用 text_demo.c:(.text+0x10e0): 未定义对HPDF_Page_TextOut' text_demo.c:(.text+0x10eb): undefined reference toHPDF_Page_EndText 的引用 text_demo.c:(.text+0x1100): 未定义对HPDF_SaveToFile' text_demo.c:(.text+0x110b): undefined reference toHPDF_Free 的引用 collect2: ld 返回1 退出状态

4

1 回答 1

2

All libharu functions are missing because the library was not found. Please change your -L option.

于 2013-05-28T14:40:45.887 回答