|
在CVAVR V2.0中如果一个工程下有多个文件,不知道如何定义全局变量,在帮助文档中如下写到:
当创建一个包含多个文件的项目时,以下规则是必须被尊守的
* 仅仅是 .c 文件能被加入到项目文件列表中。
* olny .c files must be added to the project’s Files list
* there’s no need to #include the .C files from the Files list as they will be automatically linked
* data type definitions and function declarations must be placed in header .H files,that will be #include –ed as necessary in the .c files
* global variables declarations must be placed in the .C files where necessary
* there’s no need to declare global variables , that are not static, in header .H because if these files will be #include –ed more than once, the compiler will issue errors about variable redeclarations.
//* 全局变量声明必须被放在指定的 .c 文件。
不知最后一条“全局变量声明必须被放在指定的 .c 文件”是什么意思,怎么样才能定义全局变量。
谢谢! |
阿莫论坛20周年了!感谢大家的支持与爱护!!
一只鸟敢站在脆弱的枝条上歇脚,它依仗的不是枝条不会断,而是自己有翅膀,会飞。
|