Linker flags are arguments passed to a linker to specify options, for instance to link the code with a certain library, etc
Questions tagged [linker-flags]
125 questions
1
vote
1 answer
Extract compiler and linker flags from Bazel
I need to extract the compiler flags and linker flags for a certain application that is built by Bazel.
Is there a specific command to do so?

Ma.Ha
- 11
- 1
1
vote
0 answers
Remove unused global object from static library while linking
We have a static library which contains some global class objects. This static library is used by a shared library which contains some wrapper classes. The code in shared library does not refer the global objects and also does not call the functions…

jyotesh
- 330
- 5
- 17
1
vote
0 answers
After Cocoapod update: "No such file or directory: 'FirebaseAnalytics'"
I'm getting this error after updating the Firebase pods on Xcode 12.5.1, everything was working fine before clang: error: no such file or directory: 'FirebaseAnalytics'
It started after I deleted the linker flag as described below. Initially I was…

wdbwdb1
- 195
- 2
- 9
1
vote
1 answer
Hiding symbols of the derived class in shared library
I will be writing a shared library and I've found this note on the Internet about setting the visibility of the symbols. The general guidance is to hide everything that is not needed by the client of the library, which leads to reduce the size and…

admo
- 51
- 1
- 6
1
vote
1 answer
Pass linker flags in CMake for CPLEX
In short: I can't link my program that uses CPLEX with CMake, the linker doesn't seem to find a CPLEX library (cplex), but finds some others (ilocplex). From the command line, it does work.
Detailed:
For the program using CPLEX:
#include…

RWR
- 45
- 5
1
vote
0 answers
SEGGER Embedded Studio .a file linkage questions
I am trying to import a Makefile based Cortex-M3 project into SEGGER Embedded Studio (SEGGER Embedded Studio for ARM
Release 5.10b Build 2020091601.43513).
My project compiles and links however the binary size is way too large compared to the…

SSB
- 21
- 4
1
vote
0 answers
Adding linker arguments to gradle
I am trying to use gradle to compile and link an application on Linux.
The compile section works fine, but when it links, it get undefined items because the libraries are not included for the linker. I tried multiple ways to add it (see below), but…

Don Wagner
- 11
- 1
1
vote
0 answers
Why in Xcode 11.3 Step Over(f6) work as Step Into(f7)?
On updating to xcode 11.3 while debugging Step Over(f6) started behaving similar to Step Into(f7).
Steps to Reproduce
Create a new Xcode project for macOS Command line Tool
Change main.cpp with this
#include
void test() {
…
1
vote
0 answers
Why can't I group input sections from --emit-relocs ld option inside a common output section?
I have to relocate an elf at runtime and so I want to have access to all the relocations emitted by the linker: hence the use of the --emit-relocs ld option. The thing is I want to group all the .rela.* sections into one .rela.dyn section in the…

alexghiti
- 91
- 4
1
vote
2 answers
CMake passes all gcc flags to nvcc as well
My project uses cuda kernel for a small module and needs nvcc for compiling. During compilation, cmake pass the same linker and compiler flags intended for gcc to nvcc as well. In my particular case, I get the following error.
nvcc fatal : Unknown…

Arul
- 303
- 1
- 5
- 16
1
vote
0 answers
Unity.ResolutionFailedException No public constructor is available
I created a Xamarin forms application both Android and iOS platforms and were now planning to have a deployment to google play store and App Store.
I need now to enable the Linker SDK and User Assemblies to strip all unused classes and to make the…

parpar
- 103
- 1
- 17
1
vote
2 answers
Automatically add linking options to dependants of shared lib
Let's say I have a shared lib, A, and something else that links against it, B. They are in two separate projects.
In my current setup, for A's functionality to be able to work properly, B needs to add -rdynamic to its linker options, like…

christophebedard
- 157
- 2
- 9
1
vote
2 answers
adding ios core framework to podfile
I added a pod to my Podfile and got compiler errors when building:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_CLLocation", referenced from:
objc-class-ref in MoPubAdapter(GADMAdapterMoPub.o)
ld: symbol(s) not found for…

Joseph
- 9,171
- 8
- 41
- 67
1
vote
0 answers
arm-none-eabi-ld with -z muldefs, symbol priority
I am using arm-none-eabi-ld to link a bunch of object files for a very specific embedded architecture (The Gameboy Advance, to be specific) - I have to reference a bunch of already defined symbols, in order to achieve that I am linking against a…

Karathan
- 159
- 1
- 10
1
vote
2 answers
App failing to start after adding podfile 'FMDB', related to Amazon web services
So I've been building a project using Amazon Web Services, and I decided I wanted to add local storage, so I added the podfile 'FMDB' (Using the instructional video found here: https://www.youtube.com/watch?v=D5tE61gzIVs). After adding the podfile,…

hermt2
- 844
- 3
- 14
- 33