Forum Discussion
Altera_Forum
Honored Contributor
13 years agoHi,
Can someone help? I still cant solve the problem. Let say I had a header and a source file, ======= myfunc.h ============ #ifndef _MYFUNC_H___ # define _MYFUNC_H___ # include <stdio.h> void funcCall(); # endif ====== myfunc.c ============= #include <stdio.h> # include "myfunc.h" void funcCall(){ printf("Called funcCall"); } They both are in a folder called "lib" Let say I created a new SBT project and add the source below: # include <stdio.h> # include "myfunc.h" int main(){ printf("Hello,Its working!"); funcCall(); return 0; } The build result always says that undefined reference to funcCall()... What I have to do to successfully build this simple system?