cancel
Showing results for 
Search instead for 
Did you mean: 

Source file accessible through static library. How to disable?

SShid
Associate III

I need to share some code to third party in static library form such that my source code won't be accessible to them.

I was able to create a static library project using STM32CubeIDE's New project > Static library option.

The project compiled successfully and generated a '.a' file which is I guess a collection of '.o' files corresponding to all my '.c' source files.

Now I included this '.a' file along with a '.h' file consisting of API headers in a standalone project.

Problem is that when I start debugging this new project and set a breakpoint where the library's API is called, I can see that the source file from my library gets opened and gets executed line-by-line.

I ensured that the IDE workspace doesn't have the library project in it, and also searched for no existence of the library source files in the standalone project.

I'm not being able to figure out how the code executer is able to find the library source files.

Are they included in the '.a' package itself?

If yes, are there any settings to disable this?

0 REPLIES 0