转载地址:http://blog.youkuaiyun.com/sinat_24088685/article/details/52177808
今天在u-boot的smdk2440.h文件中用单行注释双斜杠注释了一个宏定义,如下:
//#define CONFIG_CMD_NAND
- 1
在编译的时候出现下面错误提示:
arm-linux-ld:u-boot.lds:1: ignoring invalid character `#' in expression
arm-linux-ld:u-boot.lds:1: syntax error
Makefile:1193: recipe for target 'u-boot' failed
make: *** [u-boot] Error 1
- 1
- 2
- 3
- 4
- 5
解决办法:
改为其他注释方式:
/* #define CONFIG_CMD_NAND */
- 1
或
#if 0
#define CONFIG_CMD_NAND
#endif
- 1
- 2
- 3
都可以。