Link static lib in BUILD

System: Ubuntu 18.04, running isaac docker
Isaac: 2020.2
Sensor: RPLidar S1

I’m having issues with linking a static library, drivers for RPlidar. (librplidar_sdk.a)

My cc_module looks like this:

name = “rp_lidar_codelet”,
static_library = “librplidar_sdk.a”,
srcs = [“rp_lidar.cpp”],
hdrs = [“rp_lidar.hpp”],
visibility = ["//visibility:public"],
deps = [

Could you describe a bit more about what the issues are, maybe just the error output on console? I’m assuming these are link errors for missing symbols, compile issue not able to find headers, or something else perhaps? Instead of “static_library”, you could put the archive file as a in deps and set linkopts to -ldl to be resolved during linking.

The issue was with headers not being available. Solution was to build the library along with the application. It was also a better solution since changes are added to the lib as well.