完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛扫一扫,分享给好友
|
嗨,
我想在我的代码[if(strnicmp(temp,GPVTG,5))]中使用strncmp函数,但我有一个错误: & sharperror cpstm8 .. .. src main.c:278(12)缺少原型 我的include文件中有string.h文件,但我认为这还不够;],我现在该怎么办? #rtfm 以上来自于谷歌翻译 以下为原文 Hi, I want to use strncmp function in my code [ if (strnicmp(temp, GPVTG, 5)) ], but I've got an error: &sharperror cpstm8 ....srcmain.c:278(12) missing prototype I have string.h file in my include files, but I think that is not enough ;], what should i do now? #rtfm |
|
相关推荐
6个回答
|
|
|
从哪里可以获得整个图书馆?
int strnicmp(const char * sz1,const char * sz2,size_t sizeMaxCompare);在我的标题中,所以现在我需要c文件,这个函数巫婆在库中? 以上来自于谷歌翻译 以下为原文 From where can i get whole library? int strnicmp (const char* sz1, const char* sz2, size_t sizeMaxCompare); is in my header, so now i need c file with this function witch is in library? |
|
|
|
|
|
“我从哪里可以获得整个图书馆?”
你的编译器会告诉你的。 ''int strncmp(const char * sz1,const char * sz2,size_t sizeMaxCompare);在我的标题'' 但你说你想使用strncmp - 而不是strncmp。 ''所以现在我需要c文件,这个函数是巫婆在库中?'' 不必要。 最有可能的是,您的编译器会将其作为“C”源文件提供 - 但作为库的(部分)提供。 同样,您将不得不研究编译器以获取详细信息。 以上来自于谷歌翻译 以下为原文 ''From where can i get whole library?'' Your compiler wll tell you that. ''int strncmp (const char* sz1, const char* sz2, size_t sizeMaxCompare); is in my header'' But you said you wanted to use strncmp - not strncmp. ''so now i need c file with this function witch is in library?'' Not necessarily. Most likely, your compiler will provide it as a 'C' source file - but as (part of) a library. Again, you will have to study your compiler for details. |
|
|
|
|
|
Okelm
基于您收到的错误消息,我假设您拥有Cosmic编译器。如果您正在使用STVD,我建议您首先查看“项目设置”和“常规”选项卡。您的工具集应为''STM8 Cosmic''并且您应该检查''特定于项目的工具集路径''框。我的系统上的“根路径”是''C: Program Files COSMIC CXSTM8''执行此操作时,其他路径框应自动填充。 ''Bin path'' - 空白,''包含路径''='''Hstm8''& ''图书馆路径''=''自由'' 尝试删除自己的函数原型并再次包含string.h。 #include< string.h> 一旦设置了正确的路径,您就不必乱七八糟地找到标题或库。 STVD的记录非常糟糕。你通过多年的徒手格斗来学习这些东西。 玩的开心 &安培;祝你好运。 JDF 以上来自于谷歌翻译 以下为原文 Okelm Based on the error message you're getting I'm assuming that you have the Cosmic compiler. If you're using STVD I'd suggest first looking at your ''Project Settings'' and the ''General'' tab. Your toolset should be ''STM8 Cosmic'' AND you should check the ''Project specific toolset path'' box. The ''Root path'' on my system is ''C:Program FilesCOSMICCXSTM8'' When you do this the other path boxes should automatically fill. ''Bin path'' - Blank, ''Include path'' = ''Hstm8'' & ''Library path'' = ''Lib'' Try removing your own function prototype and include string.h again. #include Once the correct paths are set up you shouldn't have to mess with finding the headers or libraries. STVD is pretty poorly documented & you learn these things with years of hand-to-hand combat. Have fun & good luck. jdf |
|
|
|
|
|
谢谢,
但在改变这些路径之后问题仍然存在。我在附件中发送代码和错误。 以上来自于谷歌翻译 以下为原文 Thanks, but after changing those paths problem still exist. I'm sending my code and errors in attached files. |
|
|
|
|
|
叹!屏幕截图不是非常有用。我肯定不会重新输入你的代码,也不会重新输入任何其他人。拉上你所有的.c& .h文件为您的项目&包括stp文件。那么也许我们可以为您找到答案。
JDF 以上来自于谷歌翻译 以下为原文 sigh! Screen captures aren't terribly useful. I'm certainly not going to retype your code nor would anyone else. Zip up all your .c & .h files for your project & include the stp file. Then maybe we can find an answer for you. jdf |
|
|
|
|
|
你将''temp''声明为char然后尝试将它用作数组...屏幕截图中的大多数错误来自那里,尽管原始错误可能是由于其他原因所致。
以上来自于谷歌翻译 以下为原文 you declare ''temp'' as a char and then try to use it as an array... most of the errors in the screen captures come from there, although the original error is probably due to something else.. |
|
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
1453 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
1502 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3649 浏览 1 评论
3842 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2461 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
727浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
661浏览 5评论
710浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
941浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
745浏览 5评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-1 22:52 , Processed in 0.616400 second(s), Total 52, Slave 45 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1816