EDN首页   博客首页

日志档案

发表于 2006-11-6 23:24:14

36

标签: vxworks编程注意事项  

vxworks编程注意事项


1 在注释时要用/*  */,如果用// 有可能报错。
 解决方法:在编译规则里去掉 -ansi 开关
 问题:可能极少ansi c的扩展不能用。
 引用:“One way to do this is by removing the -ansi switch. However, you may wish to keep

your source base ANSI compliant. I do use builtin alloca() and other functions occasionally;

but I prefer the code to compile anywhere. Passing the "-Wp,-lang-c" argument should only

enable CPP comments. Here is the comment from the pre-processor docs”。
2 定义变量要在程序其它语句前,否则会报错。
3 应用程序第一行有汉语注释,编译的时候会报错.
4 在取文件名时尽量不要用大写字母开头,容易报错.

系统分类: 嵌入式   |   用户分类: vxworks学习心得   |   来源: 无分类   |   【推荐给朋友】   |   【添加到收藏夹】

    阅读(1023)    回复(0)  

投一票您将和博主都有获奖机会!