How To Add New Code - NetBeans
-
Hello all... I have this C code which I can compile and modify using NetBeans. But problems come when I try to separate some of the code to new files (.h & .c). I get these
Unresolved External Symbols xxxxx
. Example/*newFile.h*/
int add(int a, int b);/*newFile.c*/
int add(int a, int b)
{ return a + b; }/*main.c*/
#include "newFile.h"
int main()
{
int result = add(5,6); // this is where I get said error
_getch();
return 0;
}How do I overcome this error....thanks for anything you share.
-
Hello all... I have this C code which I can compile and modify using NetBeans. But problems come when I try to separate some of the code to new files (.h & .c). I get these
Unresolved External Symbols xxxxx
. Example/*newFile.h*/
int add(int a, int b);/*newFile.c*/
int add(int a, int b)
{ return a + b; }/*main.c*/
#include "newFile.h"
int main()
{
int result = add(5,6); // this is where I get said error
_getch();
return 0;
}How do I overcome this error....thanks for anything you share.
-
Hello all... I have this C code which I can compile and modify using NetBeans. But problems come when I try to separate some of the code to new files (.h & .c). I get these
Unresolved External Symbols xxxxx
. Example/*newFile.h*/
int add(int a, int b);/*newFile.c*/
int add(int a, int b)
{ return a + b; }/*main.c*/
#include "newFile.h"
int main()
{
int result = add(5,6); // this is where I get said error
_getch();
return 0;
}How do I overcome this error....thanks for anything you share.