[Dev-C++] Programming with multiple modules/files
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <and...@su...> - 2007-10-13 12:25:12
|
Dear users,
Please consider the following project-file
cenario:
///file1.c///////
#include "global.h"
main()
{
func_x();
a = 100;
...
}
///file2.c///////
extern int a;
func_x()
{
...
a=300;
}
///global.h///////
int a;
void func_x(void);
///////////
My problem is:
1) I have a lot of file2.c-type files (files with only
function definitions), a lot of functions
and several "extern" variable declarations;
2) Trying to include global.h in file2.c too, avoids
the need of declaring all extern variables. But this
action generates warnings of duplicate includes (2 or
more include global.h);
My question is:
Is there any way to manipulate several file2.c-type files
without declaring each extern variable?
Regards
Andre Barros
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.488 / Virus Database: 269.14.9/1068 - Release Date: 13/10/2007
10:15
|