Category "linker"

Linker causing seemingly random crashes?

EDIT: After some more trying and testing, it seems to set down to changing stack size everytime I change code and I want the program to run. If I don't change t

Windows 10 error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1

I am struggling to fix error: linking with 'x86_64-w64-mingw32-gcc; failed: exit code: 1, I have installed TDM-GCC-64 and Cygwin and added the

libxl Library VS Code Setup

I've tried to use libxl library but there is no installation document for vs code even if I try to add header files there is an error message "no such file or d

Error occurs when linking with glfw3 [duplicate]

I've been trying to compile C++ code and dont reliant on IDE recently, and I decided to use an editor and command line to write and compile co

How to includue multiple .cpp files into one main file [duplicate]

now in real world when building projects we use hunderends of .cpp files and we link them into one main.cpp file.Main.cpp #include <iostrea

How to detect if function is implemented in installed library?

I have my program for windows, which uses windows system library (let's name it "sysLib"), and it implements function "libFun1". My program can look like this:

What is the best way to solve multiple definitions introduced by a 3rd party library? [ELF and Mach-O]

Background Imagine the situation: static library libR.a is written rust and it depends on libCXX0.a. Binary X depends on both libR.a and libCXX0.a and it is wri

MCUxpresso imr rt - Position Independent Code result in mem fault on free rtos task activation

I have a dev board (imx rt 1024) from nxp, which I write software for using MCUxpresso (nxp's IDE). For my project, I am asked to introduce position independent

MCU crashes when "declaring" vector table in SRAM

I have a new standard c++ project on an imx rt 1024 (an nxp chip), in which I try to move my vector table to SRAM. It fails, depending on a change I apply in th

mold and lld not linking against libc correctly

I've been writing some x64 assembly on linux - exactly what it is is not relevant - and I've come across a strange problem. In my assembly code, I've declared p

ELF file variable addresses of C structure in debug info

I have .elf file. I am trying to learn symbol address. I could find main variable addresses with many ways. I used pyelftools, nm.exe, objdump.exe, readelf.exe.

windows - how to link against API sets (*ms-win*) instead kernel32.dll, ntdll.dll etc.?

How do I specify explicitly to MSVC compiler / linker to link against API sets (*ms-win* pattern matcing dlls) instead kernel32.dll, ntdll.dll etc.? For example

Can you relink/modify relative shared library look up paths?

I am running into the following situation. Project A has libraries A1, A2, A3... That follow their own directory structure. For example: Libaries/ | |--Dir1/ |

Can I change the default linker script/flags of ld?

I am using a software, which modifies some bytes in an executable. I don't know what it does exactly, but I use it for license protection of the already built b

How can I set “Other Linker Flags” to include -ObjC with CMake?

I am trying to generate an XCode project with CMake, but I can't define "Other linker flags" in project settings. I have tried using the following: set(CMAKE_SH

LD linker script, get current position of LOAD address

In linker scripts, I can get the LMA of a section like this .got : ALIGN(4) { __global_offset_table_flash_start__ = LOADADDR(.got) ; ... } >SRAM_DTC

ilink64 Error Fatal: Error detected (EXE1829)

Error (ilink64) Error Fatal: Error detected (EXE1829) occurs during link of Win64/Release static library using C++ Builder 10.2.3. Win64/Debug links fine as wel

How to set CMAKE_INSTALL_RPATH with multiple directories?

On the question CMAKE RPATH not working - could not find shared object file I see how to set CMAKE_INSTALL_RPATH for a single path, but I need it for multiple p

Link nasm with ld.lld linker

I have main.s file. extern printf extern exit section .data fmt: db "hi!", 0xa section .text global _start _start: mov rax, 0 mov rdi, fmt call printf

modify ld library search path on cluster (no root access)

I am compiling gcc 8.5 from source on a linux cluster in my home directory (no root access). I have exported -L/MYHOME/lib/' to CFLAGS, LDFLAGS, LD_LIBRARY_PATH