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.

Linker error

Hi,

 I am writing a code in C to read random memory contents from flash memory. I am using openssl library to make use of RC-4 cipher as a pseudo random generator. The problem is that when i build my project i get following errors,

undefined   first referenced
  symbol         in file     
 ---------   ----------------
 RC4         ./main.obj      
 RC4_set_key ./main.obj      
 SHA256      ./main.obj      

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "fileread.out" not built
gmake: *** [fileread.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

Once i checked the details of the error#10234-D ,,it says "The linker has encountered a symbol (function or variable) for which it cannot find the definition". whereas in my case the linker does find the header files i.e RC4.h and sha.h,, in which the RC4, RC4_set_key and SHA256 functions are declared.

Kindly tell me ,,how to resolve this error in code composer. The same code works fine in Dev C++..

Thanx a lot.

  • Imran Mak said:

    Once i checked the details of the error#10234-D ,,it says "The linker has encountered a symbol (function or variable) for which it cannot find the definition". whereas in my case the linker does find the header files i.e RC4.h and sha.h,, in which the RC4, RC4_set_key and SHA256 functions are declared.

    The header files may have the function delarations but the linker needs to be able to find the function definitions to be able to resolve the symbol. The definitions may come either from a source file (which then needs to be part of the project) or from a library (which needs to be passed to the linker at link time). If it is a library, please see this wiki link that explains how you can add the required library to your project (if using CCS): http://processors.wiki.ti.com/index.php/Build_Errors_in_CCS#Error:_unresolved_symbols_remain