-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
static lib exports too many symbols #64
Comments
It is better to hide symbols that are not needed. It can be done through second answer. I am not sure if |
I checked the CMakeList file, this line is supposed to hide the symbols. At the time clang did not have an equivalent parameter, so it is disabled for APPLE build. In your own application you can pass |
I think I solved the problem in Xcode at least. I followed the instructions here and I was able to eliminate the unwanted symbols. These settings can be set via cmake with the following:
Also, I had to remove the I have these and many more cmake changes in my Production branch. I'll make one cumulative PR in the not-too-distant future. |
Oops. Problem not solved. With the reduced symbol exports, building cbmex fails because it cannot find Any desire to export symbols from cbhwlib explicitly? |
Could define something like |
Before figuring out the problem in #63 , I attempted to link to the static lib. This failed because the static lib exports too many symbols.
I just did a
nm -gU
on cbsdk_static.a (in Mac) and it exports basically everything.I'm not sure what the best way to handle this is. As far as I can tell, it's not straightforward to hide symbols during the creation of static libs, but it is possible. Is there any reason not to hide them?
The text was updated successfully, but these errors were encountered: