This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

could not find symbol 'a certain function' in index



Hi,

I am using ccs 5.4.x, lm3s9b96, and stellarisware 10636.

I found out a strange things in ccs project as I use lwip1.3.2.

#include "utils/lwiplib.h" // "sockets.h" is nested

I added "${SW_ROOT}/third_party/lwip-1.3.2/src/include" in include options in properties.

Whenever any functions is used and typed on ccs, the function names turn to bold letter to highlight the functions with a certain color.

As you see, "lwip_bind" and "lwip_recvfrom" don't get bold. Also, as I try to open declaration by right click on the function name, tool says "could not find symbol 'function name" in index.

I don't see any compilation errors,which means ccs recognizes those functions.

I wonder what I miss to use lwip api.

Thanks,

Jin

  • Hi Jin,

    as you see these errors are normally the linker not compiler.   A symbol not found is usually a library include problem.

    Try adding the path to the linkers file search options and keep us informed.

    See this wiki

    http://processors.wiki.ti.com/index.php/Include_paths_and_options

    Best Regards,
    Lisa 

  • Hi Lisa,

    Thank you for quick reply,

    Well, I configured a couple of files and variables below in properties already. But it's still same.

    I have not found any difference in my project set up than Wiki says.

    What do I miss hmmm....

    Thanks,

    Jin

  • Hi Jin,

    as mentioned and the wiki states, this is likely related to a library and the linker.

    You need the path under ARM Linker->File search path  

    Please try that and keep us informed.

    Best Regards,
    Lisa 

  • Hi Lisa,

    Thank you for your support.

    Sorry I forgot to post this picture.

    Of course, I already set up file search path of linker like below

    Well this is weird since it has never happened before, but I will figure it out.

    Thanks,

    Jin

  • Hi Jin,

    I may see about a second pair of eyes, however where is the function/symbol you get the error on located?   Is it in a library ... you need to be sure the path is added in your file search path.  I only see the default paths there ....

    Best Regards,
    Lisa 

  • Hi Lisa,

    What I am doing now is use lwip socket, which is located in StellarisWare/lwip-1.3.2/src/api/sockets.c and StellarisWare/lwip-1.3.2/src/include/sockets.h.  sockets.h is nested in utils/lwiplib.h that is defined in 'Linked Resources', so I just include lwiplib.h instead of sockets.h.

    It doesn't show me errors but lwip socket functions don't get highlighted and don't let me open functions' declaration unlike other functions do.

    Do you mean I need to add lwip-1.3.2 into library search path?.  I am not sure since other examples using lwip, uip, and safeRTOS are not adding anything in 'File Search Path' of Linker.

    Regards,

    Jin

  • Jin,

    The routines lwip_bind, lwip_revcfrom etc. are defined in the file sockets.c.
    Do you have this source file added/linked to your project? You would need to add this file to the project to be able to resolve references to those functions and for things like "open declaration" to work.

  • Hi,

    I added sockets.c before, but I hit compilation errors since other header files are used by sockets.c. So I deleted sockets.c in my project end up. I understand what you are talking about, but I am not sure how to handle a couple of other libraries files referenced by sockets.c without changing the definition of referenced files in source codes.

    Thanks,

    Jin

  • Jin Seo said:

    I added sockets.c before, but I hit compilation errors since other header files are used by sockets.c. So I deleted sockets.c in my project end up. I understand what you are talking about, but I am not sure how to handle a couple of other libraries files referenced by sockets.c without changing the definition of referenced files in source codes.

    If your code is making calls to functions that are defined in sockets. I don't see how the linker will resolve those calls unless it finds the definition for those functions somewhere. If it can't find the definitions it will result in linker errors. You would either need to add sockets.c to your projects or strip those function definitions out of sockets.c and add them to one of your existing source files.