4,056 questions
1
vote
0
answers
12
views
How to diagnose differences between versions of .so file to understand different linker behaviour?
I have a pre-built image of a shared library, and that library implements main() with something like:
int main(...) {
bootstrap(...);
return 0;
}
bootstrap(...) {
/*...*/
sc_main(...);...
-4
votes
0
answers
97
views
What is the root of these errors in the build output of my VS2022 C++ project? [closed]
I have multiple .cpp files and .h files in VS2022, there are no red squiggly things under text (yeah I have no idea what to call them), and the code has forward decl. and no circular includes or ...
0
votes
1
answer
86
views
Linking fails with: in function `main.cold': undefined reference to `__cxa_call_terminate'
I'm trying to build, using CMake, a program involving C++ and CUDA-C++ code. It used to build file, several months ago, but - now am getting a linker error I'm not familiar with:
in function `main....
4
votes
2
answers
131
views
avr-g++ - Undefined reference to register Y upon linking
I have a weird problem when doing inline asm and compiling/linking with avr-g++ (version 16, fresh from the Git). I think this might be a bug of the tool chain, but I wanted second opinions in case I ...
0
votes
0
answers
121
views
Nightly Rust #[unsafe(naked)] function leads to undefined symbol linker error in --release mode on RISC-V
I am writing a hobby OS kernel in Rust for the riscv64gc-unknown-none-elf target. I have defined my trap_entry, as a #[unsafe(naked)] function within a Rust module.
When I compile in release mode (...
5
votes
1
answer
202
views
Linking Zig and Go for windows API
I'm trying to link a zig static library with golang. here is my build.zig
const std = @import("std");
pub fn build(b: *std.Build) void {
const windows = b.option(bool, "windows&...
0
votes
1
answer
88
views
Cannot use `-fsanitize=address` with `clang-22`
I am using Debian Unstable/Experimental.
When I use -fsanitize=address with clang-22, it fails with:
/usr/bin/ld: cannot find /usr/lib/llvm-22/lib/clang/22/lib/x86_64-pc-linux-gnu/libclang_rt....
0
votes
0
answers
39
views
Different behaviour of Visual Studio when two users link the same code [duplicate]
My colleague can build our project, while I get the following linker errors:
26>gtest.lib(gtest-all.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match ...
1
vote
1
answer
73
views
Linker placement order is reversed in map file after compiling
I am adding a linker section in the TI arm clang linker and I have added by following
MEMORY
{
TEST_SECTION ( RWIX ) : ORIGIN = 0x41C00000 , LENGTH = 0x00007800
}
--retain="*(....
0
votes
0
answers
76
views
Undefined reference to `yylval' using Flex and Bison
How can I resolve the "undefined reference to 'yylval'" error in the simplest program ever?
This is my lexer.l file
%{
#include "parser.tab.h"
%}
%%
[0-9]+ {
...
0
votes
0
answers
66
views
Cannot import Package that has FirebaseAnalytics as dependency
I have a main project with some local packages. These packages are imported in the main project as features. I want to have an Analytics package that is a simple wrapper around Firebase Analytics that ...
0
votes
1
answer
67
views
Rust Kernel: Undefined refrence to 'core::panicking::panic_null_pointer_derefrence'
Im writing a kernel in Rust, but are having some problems with the panicking module.
I have written a build script that should build the boot image of the OS, but i seem to get an error while trying ...
1
vote
0
answers
93
views
Unresolved external symbol after switching from MinGW+GCC to MSVC
I’m porting my small C++ project from MinGW + GCC to MSVC 2022 with the Ninja generator. On MinGW everything links fine, but with MSVC I keep getting this:
engine.lib(windows_window.cpp.obj) : error ...
0
votes
0
answers
566
views
Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
Created own custom pod lib. Podspecs as below,
s.ios.deployment_target = '10.0'
s.source_files = 'Classes/**/*.swift'
s.swift_version = '5.0'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => ...
1
vote
1
answer
69
views
Linking Errors with Static Library Multiple Nesting Using MinGW-w64
I'm currently build the Drogon framework on a Windows platform with MinGW.
Drogon integrated the hiredis library.
While building the project, I encountered the following linker errors:
D:/dev/mingw/...
-6
votes
1
answer
143
views
Can't add TLS callbacks to a library
So basically I want to have my TLS callbacks in a lib where ppl who use my library will automatically have the callbacks implemented into their executable.
This is my code:
// .cpp file
void ...
1
vote
1
answer
70
views
Library 'FirebaseCore' Not Found – Linker Command Failed with Exit Code 1 in Xcode [closed]
I'm facing an issue while building my iOS project in Xcode. The error message is:
Library 'FirebaseCore' not found.
Linker command failed with exit code 1 (use -v to see invocation).
I have already ...
5
votes
0
answers
140
views
Multiple symbol definition when executing unit tests if a Rust static library is linked
We have a legacy C/C++ library in which we are trying to integrate some Rust code as a C style library. However, this C/C++ library should also be usable in Rust through a wrapper written in Rust.
The ...
0
votes
1
answer
187
views
Linking issues with libvulkan (undefined reference) on Debian 12 with GNU ld [duplicate]
I want to learn programming with Vulkan. My first step was to enumerate the Vulkan extensions count available on my system. So I wrote this simple code:
#include <iostream>
#include <vulkan/...
0
votes
0
answers
86
views
version-depending gcc build error: multiple definition of `g_common' [duplicate]
I am upgrading crosstools from gcc-7.5.0 to gcc 11.4.0.
Using gcc 7.5.0, below source files can be built successfully.
But using gcc 11.4.0, linking errors occur:
PATH-TO-CROSSTOOLS/ld:
test_beta/...
1
vote
0
answers
153
views
Linker can't find mingw64 library?
"make" gave me this error message:
g++ -I src/include -L src/lib -o main main.cpp -lmingw64 -lSDL2main -lSDL2
/usr/bin/ld: cannot find -lmingw64: No such file or directory
collect2: error: ...
1
vote
1
answer
90
views
Link options are inserted before /link keyword in CMakeLists (Intel OneAPI compiler)
I'm getting a linker error because of a conflict between liburctd.lib and libmmt.lib. Why I'm getting that is a whole other question.
In trying to figure that out, I wanted to see if just setting /...
1
vote
1
answer
79
views
Do I need to implement the "new" method myself when writing GObject classes in C?
I'm trying to follow the GObject Tutorial to implement my first GObject class. So far, I've come up with this code:
train.h:
#pragma once
#include <glib-object.h>
G_BEGIN_DECLS
#define ...
1
vote
1
answer
159
views
C++ and CUDA name mangling inconsistent [closed]
I attempted to compile PyTorch from source but ran into a very strange linking error. After investigating, I discovered that a templated function defined in a C++ file and its declaration in a CUDA ...
2
votes
0
answers
110
views
libjpeg-turbo project creating linker error
this is a follow up to my previous question I asked, I made some progress with things but hit another roadblock.
I downloaded the libjpeg-turbo library from the main github repo, then I built it using ...