Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [linker]

The linker is part of the toolchain for producing executables from source code written in compiled programming languages. It takes compiled object code in multiple files and produces a single, "linked", executable file from them.

linker
1 vote
0 answers
50 views

Why are the __bss_start and __bss_end names NOT addresses?

I'm building for a Xilinx 7000 Zynq dual ARM processor. I thought the linker was gnu, but now I'm not sure whether it is or not. I can create a memory section in the linker script, with something like ...
Rich's user avatar
  • 193
1 vote
0 answers
36 views

Correct Method to Place Multiple Arrays in a Custom Flash Section in C using GCC

I need to store a constant array in flash memory at a specific location using GCC in my embedded C project. For a uint32_t value, I managed to do it like this, and it works: const uint32_t ...
WITC's user avatar
  • 197
2 votes
0 answers
58 views

How to deal with a third party DLL exporting STL symbols?

I am working on a project that is dependent on a third-party DLL. For reasons unknown, this DLL exports (most but not all) of the symbols for std::vector<unsigned char>: $ dumpbin.exe -exports ...
Parker Coates's user avatar
-1 votes
0 answers
13 views

Building for Windows Store generates a linking library error with ARM [closed]

All building works when i export from unity and open sln file in visual studio, except for ARM builds, it generates error of linking libraries, it cant open shcore.lib. i tried both 2019 and 2022, and ...
saifart101's user avatar
1 vote
0 answers
170 views

Global variable marked as extern is duplicated

I am linking a shared library that declares a global variable like so: __attribute__((visibility("hidden"))) extern HookList<MallocHook::DeleteHook> delete_hooks_; See src/malloc_hook-...
Volodymyr Lashko's user avatar
-1 votes
0 answers
47 views

Matplot++- dealing with linker errors as a novice

I have installed matplot++ using vcpkg and compiled it with c++17. Working in visual studio 2022, I tried to copy a basic example from its github: #include <cmath> #include <matplot/matplot.h&...
Ron  Tubman's user avatar
0 votes
1 answer
25 views

LLVM linker does not work on MacOS while trying to develop on-chain Solana app (C++)

this is the error i get: ./account_logger.so () dyld[61282]: Library not loaded: @rpath/libLLVM.dylib Referenced from: <A9E4BE2A-BF8D-3956-BCA9-E3BC5A6C9F9C> /Users/myusername/.local/share/...
Tiron Raul's user avatar
1 vote
2 answers
71 views

Does including a header obviate the need for extern declarations?

On page 33 of K&R (The C Programming Language, 2e), they remark that If the program is in several source files, and a variable is defined in file1 and used in file2 and file3, then extern ...
EE18's user avatar
  • 147
0 votes
1 answer
68 views

C++: ODR and extern "C" on MSVC linker

I'm testing out how the Windows link.exe program reacts when presented with ODR violations. My intention is that the linker will fail when it notices that my program has two definitions of the same ...
Martin's user avatar
  • 1,003
1 vote
1 answer
23 views

Understanding GCC Compilation: Preprocessing vs Linking with Libraries

I have a question regarding compilation with GCC. I have a slight confusion that I believe I've figured out but would like confirmation on. In the first compilation step, preprocessing (cpp) organizes ...
DLR's user avatar
  • 11
0 votes
1 answer
20 views

Strange linking problem when `dlopen` a library

I have some strange linking problem with a library which is dynamically loaded using dlopen. Precisely, I have a code that loads a library libmine.so (which is part of the code) that depends on Intel ...
Dmitry Kabanov's user avatar
0 votes
1 answer
16 views

STM32CubeIDE: How to exclude memory sections in linker script from output file

In my cube project, I need to generate a bin file as the output. The output bin file is over 2GB because it includes a RAM section (0x30000000) in the output as well as the required flash section (...
ethan's user avatar
  • 25
1 vote
1 answer
75 views

Setting Preprocessor Definitions in a referenced project

I would like to conditionally export symbols to be used in a Google Test project in Visual Studio 2019. I am trying to set a preprocessor definition called UNIT_TESTS, but only when the unit test ...
JJenkins's user avatar
0 votes
0 answers
12 views

MSVC Linker: /NODEFAULTLIB and /DEFAULTLIB option

I noticed that the MSVC linker from Microsoft has among many other options these two options: /NODEFAULTLIB and /DEFAULTLIB. The documentation says: By default, /NODEFAULTLIB removes all default ...
Sam's user avatar
  • 1,592
-1 votes
0 answers
25 views

How to run an LC-3 Assembly program

I am creating an LC-3 Assembly program. I have managed to assemble it into an obj file. I'm not sure what linker to use / what arguments to use from here. Any help would be much appreciated. I tried ...
NonzeroCornet34's user avatar

15 30 50 per page
1
2 3 4 5
945