weak-linking Questions
3
Solved
For an embedded device, I have file containing an array with function pointers storing interrupt handlers, define like that (I can't modify it):
typedef void (*const ISRFunction)(void);
__attribu...
Gabriel asked 1/8, 2016 at 9:55
3
Solved
My problem can be summarised in the following:
bar.c:
#include <stdio.h>
void bar() {
printf("bar\n");
}
main.c:
#include <stdio.h>
void __attribute__((weak)) bar() {
printf("f...
Filch asked 26/10, 2012 at 14:46
6
Solved
GCC has the ability to make a symbol link weakly via __attribute__((weak)). I want to use the a weak symbol in a static library that users can override in their application. A GCC style weak symbol...
Broeker asked 18/2, 2010 at 17:9
1
Solved
Question stated simply in title. Here is my setup:
Building a dynamic framework that optionally links (weak link) to GoogleInteractiveMediaAds.framework. For apps that use my framework, GoogleInte...
Leister asked 7/11, 2019 at 1:23
2
I am trying to build an iOS Framework (Test.framework) using the new template offered by Xcode 6 for creating Cocoa Touch Frameworks.
The framework has different dependencies (as AFNetworking or Fa...
Sada asked 6/11, 2014 at 23:13
3
Solved
I'm trying to use the cmocka unit test framework which suggests to use weak linking to be able to select a user-defined implementation over the actual implementation of a function. In my environmen...
Wallaroo asked 31/3, 2017 at 9:12
2
In brief: does LLVM/Clang support the 'weak' attribute?
I'm learning some Arduino library sources (HardwareSerial.cpp to be more detailed) and I've found some interesting attribute weak that I've n...
Fonz asked 1/10, 2015 at 5:2
1
Solved
I'm having trouble with using a library that contains weak-symbols and the --as-needed linker flag.
Example
(This uses the Jack library)
$ cat <<EOF >myjack.c
#include <jack/weakjack...
Parodist asked 7/7, 2017 at 9:20
2
Solved
It looks like GCC with -O2 and __attribute__((weak)) produces different results depending on how you reference your weak symbols. Consider this:
$ cat weak.c
#include <stdio.h>
extern cons...
Mortgagor asked 3/4, 2017 at 5:41
2
When deploying to iPhone & Apple Watch with Xcode7, I got this error:
ld: -weak_library and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
Would like to ask how b...
Georgia asked 10/7, 2015 at 1:38
2
Solved
I've been looking at questions like:
Cannot load library: reloc_library[1285]: cannot locate 'rand'
Android app crashes in the start because java.lang.UnsatisfiedLinkError
It seems to me this c...
Geanticline asked 14/1, 2015 at 3:5
2
I am encountering a different behavior between OS X and Android:
There is a weak function foo in my shared library,
I want to override it with strong function defined in my executable.
I expect t...
Someplace asked 25/11, 2013 at 15:7
1
Solved
Analyzing this question I found out some things about behavior of weak symbol resolution in the context of dynamic loading (dlopen) on Linux. Now I'm looking for the specifications governing this.
...
Kearns asked 18/12, 2013 at 12:53
2
Solved
I'm building my own framework which proposed to be distributed to other developers for including to their projects. This framework links optionally certain frameworks (e.g. CoreLocation). The probl...
Amadaamadas asked 26/8, 2014 at 11:40
2
My iOS application can use an optional external 3rd party library.
I thought of using this answer (Weak Linking - check if a class exists and use that class) and detect if the class exists before ...
Worldling asked 13/4, 2014 at 10:46
3
In Xcode, I can set a framework to "Optional" instead of "Required", which then means the framework is weak linked.
Does that mean the framework is only included in the bundle when it is imported ...
Dionisio asked 4/6, 2013 at 15:41
2
Solved
I am building an app that uses the Social.h and Accounts.h frameworks.
I have both Frameworks set as optional.
I have my Base SDK set as 6.0
I have iOS Deployment Target set as 5.0
When I build...
Glittery asked 16/5, 2013 at 19:31
2
Solved
How do I specify -weak_framework for multiple frameworks while compiling iPhone apps for older deployment targets?
Piero asked 5/12, 2011 at 12:39
2
Solved
I need to weak link some framework with my target.
But I can't find how to do it...
If I try to run my project on 3.2 iPad simulator i get the following error:
dyld: Library not loaded: /System/L...
Ecotone asked 25/6, 2011 at 21:54
2
Solved
I'm trying to create a universal iPhone app, but it uses a class defined only in a newer version of the SDK. The framework exists on older systems, but a class defined in the framework doesn't.
I ...
Inchoative asked 16/6, 2010 at 21:28
4
Solved
I want to use Twitter framework for iOS 5, but be able to run my app in older OS.
I added weak referenced framework (i.e. set "optional" flag) in Xcode 4.2 Target settings. Base SDK is iOS 5, iOS ...
Winterwinterbottom asked 20/12, 2011 at 19:20
1
Solved
Stupid question that I'm sure is some bit of syntax that's not right. How do I get dlsym to work with a function that returns a value? I'm getting the error 'invalid conversion of void* to LSError ...
Lavonna asked 6/3, 2011 at 3:29
1
I introduced Printing via AirPrint recently, but wanted to not drop support for pre 4.2 versions (obviously). Done it before for things like Game Center, etc. What I found particularly odd in this ...
Soutache asked 6/1, 2011 at 14:43
2
Solved
Due to the last release of the adMob package, I have added the MessageUI framework to my project. As I wish to deploy my application to 2.x OS devices, I have weak linked MessageUI as advised.
If ...
Ozonize asked 13/4, 2010 at 7:44
2
Solved
I've got an iPhone app that's mainly targetting 3.0, but which takes advantage of newer APIs when they're available. Code goes something like this:
if (UIApplicationDidEnterBackgroundNotification ...
Chronon asked 9/6, 2010 at 2:53
1 Next >
© 2022 - 2024 — McMap. All rights reserved.