免费注册 查看新帖 |

Chinaunix

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

[C++] C++在solaris下的编译错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-01-27 16:13 |只看该作者 |倒序浏览
最近升级了系统的GCC和boost等第三方库,所以代码需要重新build一遍,之前的开发环境上build是没问题的,其他程序在新的环境上也没有问题,只有这个程序在build的过程中出了问题,希望大家给看一下是为什么
请看红色的提示,我不清楚这是因为少链接了库还是什么.
从蓝色的部分可以看出,这应该是构造和析构出了问题.
mkdir -p dist/Debug/GNU-Solaris-Sparc
g++ -pthreads -lsocket -lnsl -lposix4 -Wall    -o dist/Debug/GNU-Solaris-Sparc/accagent build/Debug/GNU-Solaris-Sparc/AccDataTaker.o build/Debug/GNU-Solaris-Sparc/PassengerFlowThread.o build/Debug/GNU-Solaris-Sparc/Acc.o build/Debug/GNU-Solaris-Sparc/DeviceStatusThread.o build/Debug/GNU-Solaris-Sparc/EntityAccessFactory.o build/Debug/GNU-Solaris-Sparc/BasicSmith.o build/Debug/GNU-Solaris-Sparc/CBThread.o build/Debug/GNU-Solaris-Sparc/SegmentedDeviceStatus.o build/Debug/GNU-Solaris-Sparc/AccInfo.pb.o build/Debug/GNU-Solaris-Sparc/TimerThread.o  -L../../../cots/poco_1_4_6/lib/SunOS/sun4v -L../../../cots/protobuf_2_4_1/src/.libs -L../../../cots/boost_1_55_0/stage/lib -L../../../tools/lib -L../../../cots/oracle/1120/solaris10_sparc/lib -L../../../sdk -L../../../cots/RCF_2_0_0_2670/library -lposix4 -lPocoFoundationd -lPocoNet -lPocoNetd -lPocoUtild -lboost_program_options -lboost_system -lboost_thread -lPocoFoundation -lPocoUtil -lclntsh -lprotobuf -lRCFLibrary -Wall
/u01/tabuild/DAS_TCC2/tools/gcc/lib/gcc/sparc-sun-solaris2.10/4.8.2/crt1.o: In function `.nope':
(.text+0x5c): undefined reference to `main'

build/Debug/GNU-Solaris-Sparc/AccDataTaker.o: In function `CAccDataTaker::~CAccDataTaker()':
/u01/tabuild/DAS_TCC2/code/app/AccAgent/AccDataTaker.cpp:18: undefined reference to `CPassengerFlowSmith::~CPassengerFlowSmith()'

/u01/tabuild/DAS_TCC2/code/app/AccAgent/AccDataTaker.cpp:19: undefined reference to `CPassengerFlowSmith::~CPassengerFlowSmith()'
/u01/tabuild/DAS_TCC2/code/app/AccAgent/AccDataTaker.cpp:20: undefined reference to `CStationModeSmith::~CStationModeSmith()'
/u01/tabuild/DAS_TCC2/code/app/AccAgent/AccDataTaker.cpp:21: undefined reference to `CStationModeSmith::~CStationModeSmith()'
/u01/tabuild/DAS_TCC2/code/app/AccAgent/AccDataTaker.cpp:22: undefined reference to `CDeviceStatusSmith::~CDeviceStatusSmith()'
/u01/tabuild/DAS_TCC2/code/app/AccAgent/AccDataTaker.cpp:23: undefined reference to `CDeviceStatusSmith::~CDeviceStatusSmith()'
/u01/tabuild/DAS_TCC2/code/app/AccAgent/AccDataTaker.cpp:24: undefined reference to `CCacheKeeper::~CCacheKeeper()'
build/Debug/GNU-Solaris-Sparc/AccDataTaker.o: In function `CAccDataTaker::Init()':
/u01/tabuild/DAS_TCC2/code/app/AccAgent/AccDataTaker.cpp:31: undefined reference to `CPassengerFlowSmith::CPassengerFlowSmith(std::string)'

/u01/tabuild/DAS_TCC2/code/app/AccAgent/AccDataTaker.cpp:32: undefined reference to `CPassengerFlowSmith::CPassengerFlowSmith(std::string)'
/u01/tabuild/DAS_TCC2/code/app/AccAgent/AccDataTaker.cpp:33: undefined reference to `CStationModeSmith::CStationModeSmith(std::string)'
/u01/tabuild/DAS_TCC2/code/app/AccAgent/AccDataTaker.cpp:34: undefined reference to `CStationModeSmith::CStationModeSmith(std::string)'
/u01/tabuild/DAS_TCC2/code/app/AccAgent/AccDataTaker.cpp:35: undefined reference to `CDeviceStatusSmith::CDeviceStatusSmith(std::string)'
/u01/tabuild/DAS_TCC2/code/app/AccAgent/AccDataTaker.cpp:36: undefined reference to `CDeviceStatusSmith::CDeviceStatusSmith(std::string)'
/u01/tabuild/DAS_TCC2/code/app/AccAgent/AccDataTaker.cpp:37: undefined reference to `CCacheKeeper::CCacheKeeper()'

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP