0

I'm attempting to write a wrapper library and compile it to a shared object in order to access various C functions in my C# application necessary to communicate with a piece of hardware. (following this tutorial initally https://www.olegtarasov.me/build-cross-platform-c-library/)

When I build the shared object, even though it compiles I run into a missing symbol issue with various functions related to "bcm_host.h". For other missing symbols I've been able to include the .c files where the functions are housed, but for bcm_host.h there aren't .c files storing the functions that I can find.

enter image description here

Reading online people solve seem to solve this issue by installing missing kernel headers (https://raspberrypi.stackexchange.com/questions/36121/fatal-error-bcm-host-h-no-such-file-or-directory-compilation-terminated)

However following these steps doesn't solve my issue. I've downloaded the library that holds the various files including bcm_host.h, and included bcm_host.h which solves my issue with the compiling, but again, when any function is called that attempts to access these methods I hit a missing symbol error.

Is there an issue with the way that I'm linking headers? So far I've had to link .c files in order to have their functions properly map to address spaces once the library is built.

I'm sure I'm missing something quite obvious to someone who knows this area better than I do, any help would be greatly appreciated.

  • This might help: https://stackoverflow.com/questions/6141147/how-do-i-include-a-path-to-libraries-in-g Assuming you are missing include paths or not linking library name/directory – Omid CompSCI Dec 08 '20 at 05:17
  • this makes sense , but I'm not using the g++ compiler to build the shared object. I'm using a makefile. I tried the second answer from this without any luck. – The man holds me down at 1 Rep Dec 08 '20 at 05:32

0 Answers0