This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error: L6218E - undefined symbol when calling functions from another projects in the same workspace

Hi,

I'm using ARM DS-5 for my current project. In my workspace, there are two projects: test and test_bsp. My purpose is that the "test_bsp" project includes header and source files, and the application project only needs to call the functions. In the project properties, I've included the paths of all the source and header files in the "test_bsp". However, when I'm trying to build the project, I've still got an error: L2618E: Undefined symbol (my function) (referred from main.o).  Here is an example: 

In project "test": 

main.c:  

#include <stdio.h>

#include <test.h>

int main (void)

{

    printTest(); //This is where the build errors L6218E undefined symbol are

    return 0;

}

In project "test_bsp":

test.h: 

void printTest();

test.c:

 void printTest()

{

    print("Test");

}

Parents
  • The text of the question has changed from when I answered - I assume this was something you did, and not an error in the system?

    As for the error, strictly this is a linker error, not the compiler. Have you specified the path to the object (or library) from the other project? It would be typical to set the test_bsp project to build a library, and then simply add that to the link command line of the application project. You can use relative addressing to point to that liibrary within the workspace.

Reply
  • The text of the question has changed from when I answered - I assume this was something you did, and not an error in the system?

    As for the error, strictly this is a linker error, not the compiler. Have you specified the path to the object (or library) from the other project? It would be typical to set the test_bsp project to build a library, and then simply add that to the link command line of the application project. You can use relative addressing to point to that liibrary within the workspace.

Children