免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4481 | 回复: 3
打印 上一主题 下一主题

链接时出现:undefined reference to 错误的问题怎么解决? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-05-13 23:21 |只看该作者 |倒序浏览
我在终端下对程序进行链接后出现了以后提示:
/usr/acis/bin/linux_so_debug/libSpaHBridge.so:undefined reference to 'Hc_Show_Shell_Size'
程序在编译时能通过,但是在链接时就出现以上的问题,请大家帮一下忙啊!!!!

论坛徽章:
0
2 [报告]
发表于 2006-05-14 12:39 |只看该作者
缺少 lib, Hc_Show_Shell_Size 在哪个 so 中? 连接之

论坛徽章:
0
3 [报告]
发表于 2006-05-14 14:25 |只看该作者
链接后,错误信息是这样的:
[root@LF NCsimu]# make -f lqxyzMakefile
g++     -lpthread -o /home/fc/hou/NCsimu/SpheredisXYZ3                  \
/home/fc/hou/NCsimu/ncstixel1/Array.o                   \
/home/fc/hou/NCsimu/ncstixel1/VbIo.o            \
/home/fc/hou/NCsimu/ncstixel1/VbOutput.o                \
/home/fc/hou/NCsimu/ncstixel1/VbInput.o                 \
/home/fc/hou/NCsimu/ncstixel1/VbNormal.o                \
/home/fc/hou/NCsimu/ncstixel1/VbPoint1.o        \
/home/fc/hou/NCsimu/ncstixel1/VbStixel7.o       \
/home/fc/hou/NCsimu/ncstixel1/VbPlane6.o        \
/home/fc/hou/NCsimu/ncstixel1/VbSpCube.o        \
/home/fc/hou/NCsimu/ncstixel1/VbSpace16.o       \
/home/fc/hou/NCsimu/ncstixel1/VbMisc.o          \
/home/fc/hou/NCsimu/ncstixel1/VbVoxelLayer.o    \
/home/fc/hou/NCsimu/ncstixel1/voxel.o           \
/home/fc/hou/NCsimu/ncstixel1/ncstixel1.o       \
                                \
/home/fc/hou/NCsimu/ncview/MyUIRegion.o         \
/home/fc/hou/NCsimu/ncview/MyColWheel.o         \
/home/fc/hou/NCsimu/ncview/MyColEd.o            \
/home/fc/hou/NCsimu/ncview/MyColSlider.o        \
/home/fc/hou/NCsimu/ncview/MyColPatch.o         \
/home/fc/hou/NCsimu/ncview/MyFloatCBList.o      \
/home/fc/hou/NCsimu/ncview/MySlider.o           \
                                \
/home/fc/hou/NCsimu/ncmarch/MarchingCubes1.o            \
/home/fc/hou/NCsimu/ncmarch/MarchPrivate1.o             \
/home/fc/hou/NCsimu/ncmarch/printSubdivGraph.o          \
/home/fc/hou/NCsimu/ncmarch/SegmentData.o               \
/home/fc/hou/NCsimu/ncmarch/TriangulateCache.o          \
/home/fc/hou/NCsimu/ncmarch/PatchCracks.o               \
/home/fc/hou/NCsimu/ncmarch/SoVertexLabel.o             \
/home/fc/hou/NCsimu/ncmarch/SubDivEntry.o               \
/home/fc/hou/NCsimu/ncmarch/isMaterial.o                \
/home/fc/hou/NCsimu/ncmarch/GetHalfMaterial1.o          \
/home/fc/hou/NCsimu/ncmarch/util.o                      \
/home/fc/hou/NCsimu/ncmarch/Nc_MarchCubeDisplay.o       \
                                        \
/home/fc/hou/NCsimu/werkzeug/NcCylinder.o               \
/home/fc/hou/NCsimu/werkzeug/NcKugel.o          \
/home/fc/hou/NCsimu/werkzeug/NcTorus2.o         \
/home/fc/hou/NCsimu/werkzeug/NcKegel.o          \
/home/fc/hou/NCsimu/werkzeug/NcFass.o           \
/home/fc/hou/NCsimu/werkzeug/NcMaterial1.o              \
/home/fc/hou/NCsimu/werkzeug/NcSchaufelRad.o            \
                                        \
/home/fc/hou/NCsimu/ncvoxel/VxCylinder4.o               \
/home/fc/hou/NCsimu/ncvoxel/VxKugel4.o                  \
/home/fc/hou/NCsimu/ncvoxel/VxTorus1.o                  \
/home/fc/hou/NCsimu/ncvoxel/VxKegel.o                   \
/home/fc/hou/NCsimu/ncvoxel/VxFass.o                    \
/home/fc/hou/NCsimu/ncvoxel/VxMaterial1.o                       \
                                        \
/home/fc/hou/NCsimu/ncsimulation/NcSimuSpurModell1.o    \
                                        \
/home/fc/hou/NCsimu/SpheredisXYZ3.o     \
                                \
/home/fc/hou/NCsimu/input/ReadCLDATA.o          \
/home/fc/hou/NCsimu/MaterialModell/NcPathDis.o          \
-L/usr/X11R6/lib                \
/usr/lib/InventorDebug/libInventor.so \
/usr/lib/InventorDebug/libInventorXt.so \
/usr/acis/bin/linux_so_debug/libSpaHPart.so \
/usr/acis/bin/linux_so_debug/libSpaHBridge.so  \
/usr/acis/bin/linux_so_debug/libSpaABlend.so  \
/usr/acis/bin/linux_so_debug/libSpaACIS.so  \
/usr/acis/bin/linux_so_debug/libSpaALops.so  \
/usr/acis/bin/linux_so_debug/libSpaAPart.so  \
/usr/acis/bin/linux_so_debug/libSpaASurf.so  \
/usr/acis/bin/linux_so_debug/libSpaAVis.so  \
/usr/acis/bin/linux_so_debug/libSpaAWarp.so  \
/usr/acis/bin/linux_so_debug/libSpaBase.so  \
                                        \
#               -lGLU -lGL -lX11 -lm -lXt -lXm -lXext   \
        -lGLU -lGL -lX11 -lm -lXt
/usr/bin/ld: warning: libSpaBase.so, needed by /usr/acis/bin/linux_so_debug/libSpaHPart.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libSpaACIS.so, needed by /usr/acis/bin/linux_so_debug/libSpaHPart.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libSpaAPart.so, needed by /usr/acis/bin/linux_so_debug/libSpaHPart.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libSpaHBridge.so, needed by /usr/acis/bin/linux_so_debug/libSpaHPart.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libSpaAVis.so, needed by /usr/acis/bin/linux_so_debug/libSpaHPart.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libhoops920.so, needed by /usr/acis/bin/linux_so_debug/libSpaHPart.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libSpaABlend.so, needed by /usr/acis/bin/linux_so_debug/libSpaALops.so, not found (try using -rpath or
-rpath-link)
/usr/bin/ld: warning: libSpaALops.so, needed by /usr/acis/bin/linux_so_debug/libSpaASurf.so, not found (try using -rpath or -rpath-link)
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Show_Shell_Size'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Reset_System'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Open_Geometry'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Move_By_Key'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Set_Marker_Size'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Compute_Coordinates'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Find_Contents'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Set_Normal'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Parse_String'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Open_Vertex'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_KShow_Owner_By_Key'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Set_Line_Weight'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Show_Key_Type'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Delete_By_Key'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_KInsert_Text'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_KOpen_Segment'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Show_Net_Normal'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Show_Key_Status'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Set_Color_By_Value'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Open_Segment_By_Key'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_KInsert_NURBS_Curve'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Set_User_Index'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_KInsert_Elliptical_Arc'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Set_Text_Font'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Begin_Contents_Search'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Set_Modelling_Matrix'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Close_Vertex'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_End_Contents_Search'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Set_Heuristics'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_KInsert_Shell'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Close_Segment'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Set_Color'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Show_Owner_By_Key'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Close_Geometry'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Define_Texture'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Insert_PolyCylinder'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Insert_Line'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Show_One_Net_User_Index'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Open_Segment'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Set_Parameter'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Set_Visibility'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_KInsert_Local_Light'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Show_Shell'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_KInsert_Spot_Light'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_KInsert_Distant_Light'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Report_Error'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_KInsert_Line'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_KInsert_Marker'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_KInsert_Polyline'
/usr/acis/bin/linux_so_debug/libSpaHBridge.so: undefined reference to `HC_Compute_Optimized_Shell'
collect2: ld returned 1 exit status
make: *** [default] Error 1

论坛徽章:
0
4 [报告]
发表于 2006-05-16 09:37 |只看该作者
把用C代码实现的部分用extern "C"
{
.....
}
试一下
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP