keil多文件编译出错,请大家帮忙看看什么原因。
原来的程序可以编译通过,仅仅把5110液晶屏的驱动改成12864的就出现下面的提示:Build target 'Target 1'
assembling STARTUP.A51...
compiling main.c...
SRC\DS1302.H(49): error C129: missing ';' before 'extern'
compiling ds1302.c...
compiling keyscan.c...
SRC\KEYSCAN.H(16): error C129: missing ';' before 'extern'
compiling mileage.c...
SRC\DS1302.H(49): error C129: missing ';' before 'extern'
compiling 12864.c...
SRC\DS1302.H(49): error C129: missing ';' before 'extern'
Target not created
实在调不通了请大家帮帮忙。 你不上程序。。。怎么帮你 肯定是变量定义有冲突 楼主可以搜搜 模块化 编程的视频看看 回复【2楼】liqiaw
-----------------------------------------------------------------------
终于解决了,把这个函数void white_hanzi_32(unsigned char x,unsigned char y,unsigned char HZK_32),
改成void white_hanzi_32(unsigned char x,unsigned char y,unsigned char c);
原来是形参在作怪,谢谢楼上两位朋友 虽然问题解决了,可不明白为什么会这样,期待高手的解答 one is passing a pointer to a char;
and one is passing a char.
the difference is night and day. 回复【5楼】millwood0
-----------------------------------------------------------------------
还是不明白,在单个C文件中可以通过编译的,
难道在多个C文件编译时不允许用数组指针做形参吗,还是声明定义错误。 把相关调用部分也贴出来才能看出。
你只贴个声明,无法得知是声明和定义不一致,亦或是声明和使用不一致,还是其他问题 回复【3楼】wtiechen1969
回复【2楼】liqiaw
-----------------------------------------------------------------------
终于解决了,把这个函数void white_hanzi_32(unsigned char x,unsigned char y,unsigned char hzk_32),
改成void white_hanzi_32(unsigned char x,unsigned char y,unsigned char c);
原来是形参在作怪,谢谢楼上两位朋友
-----------------------------------------------------------------------
一个后面是逗号,一个后面是分号。这与形参有关么? 顶楼上的
原因应该是“逗号改成 分号”。
页:
[1]