编译haru text_demo.c错误

时间:2012-10-23 18:20:56

标签: pdf compiler-errors

在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 to HPDF_Page_MoveTo' text_demo.c :(。text + 0xd0):undefined   参考HPDF_Page_TextWidth' text_demo.c:(.text+0xe9): undefined reference to HPDF_Page_LineTo' text_demo.c :(。text + 0xf4):undefined   参考HPDF_Page_Stroke' text_demo.c:(.text+0x116): undefined reference to HPDF_Page_SetLineWidth' /tmp/ccmPxCcu.o:在功能上   show_description': text_demo.c:(.text+0x129): undefined reference to HPDF_Page_GetCurrentFontSize' text_demo.c :(。text + 0x137):undefined   参考HPDF_Page_GetCurrentFont' text_demo.c:(.text+0x14c): undefined reference to HPDF_Page_GetRGBFill'   text_demo.c :(。text + 0x15a):未定义的引用   HPDF_Page_BeginText' text_demo.c:(.text+0x180): undefined reference to HPDF_Page_SetRGBFill' text_demo.c :(。text + 0x193):undefined   引用HPDF_Page_SetTextRenderingMode' text_demo.c:(.text+0x1ae): undefined reference to HPDF_Page_SetFontAndSize' text_demo.c :(。text + 0x1d6):undefined   参考HPDF_Page_TextOut' text_demo.c:(.text+0x1e1): undefined reference to HPDF_Page_EndText' text_demo.c :(。text + 0x1fa):undefined   参考HPDF_Page_SetFontAndSize' text_demo.c:(.text+0x21a): undefined reference to HPDF_Page_SetRGBFill' /tmp/ccmPxCcu.o:In   函数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):undefined   参考HPDF_GetFont' text_demo.c:(.text+0x335): undefined reference to HPDF_AddPage' text_demo.c :(。text + 0x34a):undefined   引用print_grid' text_demo.c:(.text+0x365): undefined reference to HPDF_Page_SetFontAndSize' 。text_demo.c :(文字+ 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 to HPDF_Page_GetWidth' text_demo.c :(。text + 0x3d4):undefined   参考HPDF_Page_TextOut' text_demo.c:(.text+0x3df): undefined reference to HPDF_Page_EndText' text_demo.c :(。text + 0x3ea):undefined   参考HPDF_Page_BeginText' text_demo.c:(.text+0x3f5): undefined reference to HPDF_Page_GetHeight'   text_demo.c :(。text + 0x415):未定义的引用   HPDF_Page_MoveTextPos' text_demo.c:(.text+0x43b): undefined reference to HPDF_Page_SetFontAndSize' text_demo.c :(。text + 0x45c):undefined   参考HPDF_Page_MoveTextPos' text_demo.c:(.text+0x47c): undefined reference to HPDF_Page_GetWidth' text_demo.c :(文字+ 0x4aa):   对HPDF_Page_MeasureText' text_demo.c:(.text+0x4cd): undefined reference to HPDF_Page_ShowText'的未定义引用   text_demo.c :(。text + 0x4ea):未定义的引用   HPDF_Page_MoveTextPos' text_demo.c:(.text+0x505): undefined reference to HPDF_Page_SetFontAndSize' text_demo.c :(。text + 0x53f):未定义   引用HPDF_Page_ShowText' text_demo.c:(.text+0x57c): undefined reference to HPDF_Page_SetFontAndSize' 。text_demo.c :(文字+ 0x599):   对HPDF_Page_MoveTextPos' text_demo.c:(.text+0x5ac): undefined reference to HPDF_Page_ShowText'的未定义引用   text_demo.c :(。text + 0x5c7):未定义的引用   HPDF_Page_SetFontAndSize' text_demo.c:(.text+0x5e4): undefined reference to HPDF_Page_MoveTextPos' 。text_demo.c :(文字+ 0x665):   对HPDF_Page_SetRGBFill' text_demo.c:(.text+0x67a): undefined reference to HPDF_Page_ShowText'的未定义引用   text_demo.c :(。text + 0x6a3):未定义的引用   HPDF_Page_MoveTextPos' text_demo.c:(.text+0x6fe): undefined reference to HPDF_Page_SetRGBFill' text_demo.c :(。text + 0x713):undefined   引用HPDF_Page_ShowText' text_demo.c:(.text+0x73c): undefined reference to HPDF_Page_MoveTextPos' 。text_demo.c :(文字+ 0x797):   对HPDF_Page_SetRGBFill' text_demo.c:(.text+0x7ac): undefined reference to HPDF_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):undefined   参考HPDF_Page_SetRGBFill' text_demo.c:(.text+0x820): undefined reference to HPDF_Page_SetLineWidth'   text_demo.c :(。text + 0x856):未定义的引用   HPDF_Page_SetTextRenderingMode' text_demo.c:(.text+0x861): undefined reference to HPDF_Page_BeginText' 。text_demo.c :(文字+ 0x884):   对HPDF_Page_TextOut' text_demo.c:(.text+0x88f): undefined reference to HPDF_Page_EndText'的未定义引用。text_demo.c :(文字+ 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 to HPDF_Page_EndText' text_demo.c :(。text + 0x94c):未定义的引用   到HPDF_Page_SetTextRenderingMode' text_demo.c:(.text+0x957): undefined reference to HPDF_Page_BeginText'   text_demo.c :(。text + 0x982):对HPDF_Page_TextOut' text_demo.c:(.text+0x98d): undefined reference to HPDF_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):undefined   参考HPDF_Page_BeginText' text_demo.c:(.text+0xa0c): undefined reference to HPDF_Page_TextOut' 。text_demo.c :(文字+ 0xa17):   对HPDF_Page_EndText' text_demo.c:(.text+0xa45): undefined reference to HPDF_Page_GRestore'的未定义引用text_demo.c :(文字+ 0xa7b):   未定义引用HPDF_Page_GSave' text_demo.c:(.text+0xa8e): undefined reference to HPDF_Page_SetTextRenderingMode'   text_demo.c :(。text + 0xa99):未定义的引用   HPDF_Page_BeginText' text_demo.c:(.text+0xac4): undefined reference to HPDF_Page_TextOut' text_demo.c :(。text + 0xacf):未定义的引用   到HPDF_Page_EndText' text_demo.c:(.text+0xafd): undefined reference to HPDF_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):undefined   参考HPDF_Page_BeginText' text_demo.c:(.text+0xb7c): undefined reference to HPDF_Page_TextOut' 。text_demo.c :(文字+ 0xb87):   对HPDF_Page_EndText' text_demo.c:(.text+0xbb5): undefined reference to HPDF_Page_GRestore'的未定义引用。text_demo.c :(文字+ 0xbc8):   未定义引用HPDF_Page_SetTextRenderingMode' text_demo.c:(.text+0xbee): undefined reference to HPDF_Page_SetRGBFill' text_demo.c :(。text + 0xc09):未定义的引用   到HPDF_Page_SetFontAndSize' text_demo.c:(.text+0xc5d): undefined reference to HPDF_Page_BeginText' 。text_demo.c :(文字+ 0xc79):   未明确引用cos' text_demo.c:(.text+0xc8a): undefined reference to sin' text_demo.c :(。text + 0xcb3):未定义的引用   sin' text_demo.c:(.text+0xcc4): undefined reference to COS'   text_demo.c :(。text + 0xd0a):未定义的引用   HPDF_Page_SetTextMatrix' text_demo.c:(.text+0xd1d): undefined reference to HPDF_Page_ShowText' text_demo.c :(。text + 0xd28):undefined   引用HPDF_Page_EndText' text_demo.c:(.text+0xd5e): undefined reference to HPDF_Page_BeginText' 。text_demo.c :(文字+ 0xdb6):   未明确引用tan' text_demo.c:(.text+0xdc7): undefined reference to tan' text_demo.c :(。text + 0xe11):未定义的引用   HPDF_Page_SetTextMatrix' text_demo.c:(.text+0xe24): undefined reference to HPDF_Page_ShowText' text_demo.c :(。text + 0xe2f):undefined   引用HPDF_Page_EndText' text_demo.c:(.text+0xe65): undefined reference to HPDF_Page_BeginText' text_demo.c :(文字+ 0xeac):   对HPDF_Page_SetTextMatrix' text_demo.c:(.text+0xebf): undefined reference to HPDF_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 to HPDF_Page_ShowText' text_demo.c :(。text + 0xf65):undefined   引用HPDF_Page_EndText' text_demo.c:(.text+0xfef): undefined reference to HPDF_Page_SetFontAndSize' 。text_demo.c :(文字+ 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 to HPDF_Page_EndText' text_demo.c :(。text + 0x1063):未定义的引用   到HPDF_Page_SetCharSpace' text_demo.c:(.text+0x106e): undefined reference to HPDF_Page_BeginText' 。text_demo.c :(文字+ 0x1092):   对HPDF_Page_TextOut' text_demo.c:(.text+0x109d): undefined reference to HPDF_Page_EndText'的未定义引用。text_demo.c :(文字+ 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 to HPDF_Page_EndText' text_demo.c :(。text + 0x1100):未定义的引用   到HPDF_SaveToFile' text_demo.c:(.text+0x110b): undefined reference to HPDF_Free' collect2:ld返回1退出状态

1 个答案:

答案 0 :(得分:1)

由于找不到库,因此缺少所有libharu函数。请更改您的-L选项。