完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
到目前为止,我的集合中仅有的具有以下结构的MCC生成的.h文件是FVR.H:所有其他的都没有关闭IFDEF部分(上面代码示例中的最后3行),并且一些文件也没有第一个IDEF部分!CPLUSSPLUS部分是在那里吗?如果是,它应该是什么样子?在哪些文件中?让我困惑的事情似乎有很多可变性。
以上来自于百度翻译 以下为原文 The only MCC generated .h file in my collection so far that has the following structure is fvr.h: #ifdef __cplusplus extern "C" { #endif ...code... ...code... ...code... #ifdef __cplusplus } #endif All the others have no closing ifdef section (the last 3 lines in the above code example) and some files do not have the first idef section either! Is the cplusplus section meant to be there? If it is, what should it look like? In which files? There seems to be a lot of variability in things which confuses me. |
|
相关推荐
10个回答
|
|
你是说有些文件有打开的文件,但不是关闭部分?它可能是一个bug,或者关闭部分可能在.c文件中,但是除非你用C++编译器构建它,否则它不会影响你。
以上来自于百度翻译 以下为原文 Are you saying some files have the opening #ifdef __cplusplus section, but not the closing section? It could be a bug, or the closing section might be in the .c file, but it wouldn't affect you unless you were building with a C++ compiler. |
|
|
|
使用XC8 1.42…所以我想整个部分都被删除了…?
以上来自于百度翻译 以下为原文 Using xc8 1.42 ... so I guess the whole section an be removed ... ? |
|
|
|
我不使用MCC,但我认为您不想修改生成的代码,除非文档告诉您可以。
以上来自于百度翻译 以下为原文 I don't use MCC, but I don't think you want to be modifying generated code unless the documentation tells you that you can. |
|
|
|
以上就是“便携性支持”。在C++中,下面的构造可能是必要的:在这些情况下,γIFIFF…在一个代码块的开始和结束时,会出现一个代码块,如在初始端口中所示。但是可以出现其他的需要,其中“所有”都可以在一个单独的IFIFF中完成。由于XC8不是C++类型,这些便携插件可以省略,甚至是bug,因为它们没有被处理。
以上来自于百度翻译 以下为原文 The above is simply "portability support. In C++ the following construct can be necessary: extern "C" { < .. whatever C code block .. > } In these cases the #ifdef ... #endif blocks should appear at the start and at the end of such a code block - as shown in the initial port. But there can arise other needs where "everything" can be done in a single #ifdef ... #endif block. And - as XC8 is not the C++ type - these portability inserts can be omitted or even buggy, as they are not processed. |
|
|
|
因此,从这个讨论中,最好在这种情况下把这些构造放在一起。就像在我的另一篇文章中提到的“包容卫士”一样,我将尝试在我的代码中尝试一致性作为第一个成果。
以上来自于百度翻译 以下为原文 So I guess from this discussion it might be best to leave these constructs out all together in this circumstance. As in my other post about the include guards I'll end up trying for consistency across my code as a first achievement. |
|
|
|
以上来自于百度翻译 以下为原文 extern "C" is a message to a C++ Compiler that the this section of code is plain C. Xc8 does not need it. In fact no MCC targets need it. So it is not needed and questionable why it is even there. |
|
|
|
至少PIC32是“足够大”,可以从一个C++编译器获得利润。这将简化一些应用程序,例如关于网络(IEEE 802。x)。因此做好准备并不坏。
以上来自于百度翻译 以下为原文 At least the PIC32 is "big enough" to profit from a C++ capable compiler. This would ease some applications - eg. regarding networking (IEEE 802.x). Thus it is not bad to be prepared ... |
|
|
|
MCC只支持低端PIC32。他们中没有一个人会从C++中得到这么多。但我猜他们可以运行C++。
以上来自于百度翻译 以下为原文 MCC only supports low end PIC32s. (MM?) None of them will benifeit that much from C++. But I guess they could run C++. |
|
|
|
MICC支持大量的PIC32 MX和/WW1.MICCHIP.COM/DeLoSt/En/DeCiDeCO/RelaseE.No.SePixMx2.V1Y35.5.PDFHTTP://WW1.MICCHIP.COM/DIXBOSS/En/DeVICECDOC/RelaseEnEnthsPIC24.DSPICEPIC32 MVYV13535Y1.PDFRIGARDS
以上来自于百度翻译 以下为原文 Hi Actually, MCC supports lots of PIC32MX and PIC32MM : http://ww1.microchip.com/downloads/en/DeviceDoc/release_notes_pic32mx_v1_35.pdf http://ww1.microchip.com/downloads/en/DeviceDoc/release_notes_pic24_dspic_pic32mm_v1_35_1.pdf Regards |
|
|
|
然后我猜它会更有意义。对于8位16位CPU来说,它仍然是不必要的绒毛。
以上来自于百度翻译 以下为原文 Then I guess it makes a little more sense. It is still unneeded fluff for the 8-16 bit CPUs. |
|
|
|
只有小组成员才能发言,加入小组>>
5171 浏览 9 评论
2001 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3176 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
737浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
635浏览 0评论
533浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-26 01:11 , Processed in 1.419294 second(s), Total 96, Slave 79 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号