免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6887 | 回复: 7

移植程序后,gcc编译报错,看不懂都是什么错误 [复制链接]

论坛徽章:
0
发表于 2007-07-11 19:29 |显示全部楼层
最近需要从AIX将一应用程序移植到HP-UX11.11中,hp机器中使用的是gcc4.1.2的编译。make后,gcc报一堆错误:主要都是.h文件中的报错。请求各位大侠给小女子指点一下!
例如
。。。。。
/home/eai/falib64/include/iconv.h:114: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
/home/eai/falib64/include/iconv.h:126: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
In file included from base64.c:9:
/home/eai/falib64/include/eai_front.h:29: warning: empty declaration
/home/eai/falib64/include/eai_front.h:31: error: storage class specified for parameter 'EAIGroup'
/home/eai/falib64/include/eai_front.h:35: error: expected ')' before '*' token
/home/eai/falib64/include/eai_front.h:36: error: expected ')' before '*' token
/home/eai/falib64/include/eai_front.h:37: error: expected declaration specifiers or '...' before 'EAIGroup'
/home/eai/falib64/include/eai_front.h:38: error: expected declaration specifiers or '...' before 'EAIGroup'
/home/eai/falib64/include/eai_front.h:39: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:40: error: expected ';', ',' or ')' before '*' token
/。。。。。

/home/eai/falib64/include/eai_front.h:48: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:49: error: expected declaration specifiers or '...' before 'EAIGroup'
/home/eai/falib64/include/eai_front.h:49: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:57: warning: empty declaration
/home/eai/falib64/include/eai_front.h:58: error: storage class specified for parameter 'EAIMessage'
/home/eai/falib64/include/eai_front.h:63: error: expected ')' before '*' token
/home/eai/falib64/include/eai_front.h:64: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:65: error: expected ')' before '*' token
/home/eai/falib64/include/eai_front.h:66: error: expected declaration specifiers or '...' before 'EAIMessage'
/home/eai/falib64/include/eai_front.h:67: error: expected declaration specifiers or '...' before 'EAIMessage'
/home/eai/falib64/include/eai_front.h:68: error: expected declaration specifiers or '...' before 'EAIMessage'
/
/eai_front.h:81: error: expected declaration specifiers or '...' before 'EAIMessage'/falib64/include/eai_front.h:90: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:91: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:92: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:93: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:94: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:95: error: expected declaration specifiers or '...' before 'EAIGroup'
/home/eai/falib64/include/eai_front.h:95: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:96: error: expected declaration specifiers or '...' before 'EAIGroup'
/home/eai/falib64/include/eai_front.h:96: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:97: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:98: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:99: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:100: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:101: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:102: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:103: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:104: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:105: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:106: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:110: error: expected declaration specifiers or '...' before 'EAIMessage'
/home/eai/falib64/include/eai_front.h:111: error: expected ')' before '*' token
/home/eai/falib64/include/eai_front.h:112: error: expected ')' before '*' token
/home/eai/falib64/include/eai_front.h:113: error: expected declaration specifiers or '...' before 'EAIGroup'
/home/eai/falib64/include/eai_front.h:114: error: expected ';', ',' or ')' before '*' token
/home/eai/falib64/include/eai_front.h:123: error: expected ';', ',' or ')' before '*' token
base64.c:12: error: storage class specified for parameter 'ByteTable'
base64.c:12: error: parameter 'ByteTable' is initialized
base64.c:13: warning: initialization makes pointer from integer without a cast

base64.c:112: warning: (near initialization for 'DeByteTable')
base64.c:113: warning: excess elements in scalar initializer
base64.c:113: warning: (near initialization for 'DeByteTable')
base64.c:113: warning: excess elements in scalar initializer
base64.c:113: warning: (near initialization for 'DeByteTable')
base64.c:113: warning: excess elements in scalar initializer
base64.c:113: warning: (near initialization for 'DeByteTable')

base64.c:113: warning: (near initialization for 'DeByteTable')
base64.c:113: warning: excess elements in scalar initializer
base64.c:117: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
base64.c:148: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

。。。。
/include/eai_front.h:110: error: declaration for parameter 'setEncRequestParameter' but no such parameter
/home/eai/falib64/include/eai_front.h:83: error: declaration for parameter 'parseXML2EAIMsg' but no such parameter
/home/eai/falib64/include/eai_front.h:81: error: declaration for parameter 'SetTellerChoice' but no such parameter
/home/eai/falib64/include/eai_front.h:80: error: declaration for parameter 'SetTellerID' but no such parameter
/home/eai/falib64/include/eai_front.h:79: error: declaration for parameter 'SetTermSrl' but no such parameter
/home/eai/falib64/include/eai_front.h:78: error: declaration for parameter 'SetTermType' but no such parameter
/home/eai/falib64/include/eai_front.h:76: error: declaration for parameter 'setRequestParameterNew' but no such parameter
/home/eai/falib64/include/eai_front.h:75: error: declaration for parameter 'setRequestArrayParameter' but no such parameter
/home/eai/falib64/include/eai_front.h:74: error: declaration for parameter 'setRequestParameter' but no such parameter

/home/eai/falib64/include/eai_front.h:58: error: declaration for parameter 'EAIMessage' but no such parameter
/home/eai/falib64/include/eai_front.h:38: error: declaration for parameter 'setSimpleField' but no such parameter
/home/eai/falib64/include/eai_front.h:37: error: declaration for parameter 'setGroupName' but no such parameter
/home/eai/falib64/include/eai_front.h:34: error: declaration for parameter 'getGroupErrorCode' but no such parameter
/home/eai/falib64/include/eai_front.h:33: error: declaration for parameter 'getGroupErrorMsg' but no such parameter
/home/eai/falib64/include/eai_front.h:31: error: declaration for parameter 'EAIGroup' but no such parameter
/home/eai/falib64/include/eai_front.h:10: error: declaration for parameter 'Base64Dec' but no such parameter
/home/eai/falib64/include/eai_front.h:9: error: declaration for parameter 'Base64Enc' but no such parameter
/

论坛徽章:
0
发表于 2007-07-12 09:58 |显示全部楼层
为什么没有人理我呢!给点提示也好啊!谢谢了呢!

论坛徽章:
0
发表于 2007-07-12 10:06 |显示全部楼层
可能是aix与hp的系统头文件定义有点不一样!
需要转换下!
(记不得了.....那是long long ago.. )

论坛徽章:
0
发表于 2007-07-12 14:55 |显示全部楼层

回复 #1 luna96 的帖子

不同系统之间的软件移植是有一定难度的,建议你先查看有关文档,理清步骤和要点后再做.
不是拿来代码gcc一下就能完成的.

论坛徽章:
0
发表于 2007-07-13 09:24 |显示全部楼层
这种系统移植是需要测试N久的,并且需要对2个系统都很熟悉的高人才行,不然电信移动金融的单位也不至于为了应用平台移植的事伤脑筋了,要知道这些单位想移植都会有厂商的人帮忙搞的.

论坛徽章:
0
发表于 2007-07-13 10:06 |显示全部楼层
我承认我开始是想的太简单了,但是我们的应用程序还是比较小的,依赖的外部包也都有两个系统的相应的版本,我再另外一台有hp  ansi-c的机器上就可以编译通过。所以我觉得在我们机器上用gcc应该也问题不大,可事实却让我郁闷了。。。

论坛徽章:
0
发表于 2007-07-13 11:34 |显示全部楼层
呵呵,宏定义转换!
过去从alpha移植到sun上也曾经遇到过类似的!

论坛徽章:
0
发表于 2007-07-13 15:06 |显示全部楼层
早上解决了一下,好像是转码头文件iconv.h链接的问题。不过现在程序还有好多错误,问题一个接着一个。还真是!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP