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.

C6Run buffer allocation library



All,

I am currently trying to use C6run to add DSP optimizations to an existing c++ library.  What I need to do is allow a piece of c++ code to allocate a piece of memory and pass it to a c function that I have compiled with c6runlib-cc.  I understand that all memory references passed to a function to run to the DSP must be allocated with C6RUN_MEM_malloc.  I have taken the recommended route of adding the following code to my c++ files:

  extern void    *C6RUN_MEM_malloc(size_t size);
  extern void    *C6RUN_MEM_calloc(size_t nelem, size_t elsize);
  extern void     C6RUN_MEM_free(void* ptr);
  #define malloc(sz) C6RUN_MEM_malloc(sz)
  #define calloc(n,sz) C6RUN_MEM_calloc(n,sz)
  #define free(ptr) C6RUN_MEM_free(ptr)

All of the source compiles without a problem, but the linking fails with:

omap/matcher.o: In function `Matcher::createSobelImages(short*, int const*, unsigned char*, unsigned char*)':
matcher.cpp:(.text+0x44): undefined reference to `C6RUN_MEM_malloc(unsigned int)'
matcher.cpp:(.text+0x50): undefined reference to `C6RUN_MEM_malloc(unsigned int)'
matcher.cpp:(.text+0xa50): undefined reference to `C6RUN_MEM_free(void*)'
matcher.cpp:(.text+0xa58): undefined reference to `C6RUN_MEM_free(void*)'

etc etc

Since I am not using c6run to compile the c++ file (I understand it can't handle c++...) I need to give the linker a library that provides the C6RUN_MEM functions.  I have looked through the C6run directories and found a few libraries that looked promising, but nothing was able to satisfy the linker.  Can anyone point me in the direction of the library I need to link against to give my c++ functions access to the C6RUN_MEM functions?

Thanks,

Justin