Hi all,
i wrote one code like this
File1.c
_____________________________________________
void f1() {
printf("From f1()\n"
}
int main() {
printf("Frim main() File1.c\n"
f1();
f2();
}
_____________________________________________
File2.c
_____________________________________________
void f2() {
printf("From f1()\n"
}
int main() {
printf("Frim main() File2.c\n"
f1();
f2();
}
_____________________________________________
As you can guess at the time of compilation i am getting
the error main muliple define.
Is it any way to add some directive in the code to make
two different exe, one from file1 and one from file2.
I don't want to change the code for each compilation.
Regards,
Amar
i wrote one code like this
File1.c
_____________________________________________
void f1() {
printf("From f1()\n"
}
int main() {
printf("Frim main() File1.c\n"
f1();
f2();
}
_____________________________________________
File2.c
_____________________________________________
void f2() {
printf("From f1()\n"
}
int main() {
printf("Frim main() File2.c\n"
f1();
f2();
}
_____________________________________________
As you can guess at the time of compilation i am getting
the error main muliple define.
Is it any way to add some directive in the code to make
two different exe, one from file1 and one from file2.
I don't want to change the code for each compilation.
Regards,
Amar