4,057 questions
0
votes
0
answers
38
views
Weird linker error "undefined reference to `__imp__vsnprintf'" in "libcrypto.a" in C++ Windows project?
I've been working on a C++ project. I have been using 2 Windows PCs for building it and both worked fine with the same (kinda janky) setup. I recently got a new computer and I get a linker error. My ...
0
votes
1
answer
33
views
Static library not found by linker despite its directory being stated
I've got a problem with a static library (.a file) I'd like to include into my project: Compilation (with gcc) works well, but linking ends with the library not being found by ld whatever I do:
arm-...
1
vote
1
answer
38
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(...);...
0
votes
0
answers
45
views
React Native 0.82 iOS linker error: Undefined symbols for architecture arm64 (unsafeExecuteOnMainThreadSync )
I’m migrating an existing React Native app to React Native 0.82.x.
Android builds and runs fine, but iOS fails at the link step with the following error:
Undefined symbols for architecture arm64:
&...
1
vote
6
answers
203
views
How can I tell my compiler or linker, that some symbol reference is only necessary for some function?
Suppose I'm working a library; say it's in C for simplicity. This library exposes and defines two functions:
f(), which calls an auxiliary function aux(), declared but not defined by my library.
g() ...
0
votes
1
answer
105
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....
0
votes
0
answers
78
views
Where is wgpu::EmscriptenSurfaceSourceCanvasHTMLSelector located?
I'm following this C++ WebGPU tutorial (with associated Git repo here) in another language, and so must rewrite the build script accordingly.
The tutorial calls wgpu::glfw::CreateSurfaceForWindow ...
4
votes
2
answers
141
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
63
views
Qt isn't detecting MSVC compiler while installation
My Qt isn't able to detect MSVC 2022 compiler only showing MINGW compiler in installation. I have Visual Studio with MSVC 2022 Latest and have all the necessary configuration like software ...
0
votes
0
answers
136
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 (...
0
votes
0
answers
70
views
Undefined symbols error when integrating VStarCam native iOS SDK in Flutter using MethodChannel
I'm integrating the native iOS VStarCam SDK into my Flutter project using MethodChannel. On iOS, I get multiple "Undefined symbol" linker errors when building the app for a physical device. ...
5
votes
1
answer
216
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
0
answers
70
views
GMP 4.2 linker failure - multiple definitions in assert.o
I need to compile an old version of GCC and it requires also old version of several libs.
One of them is gmp-4.2.
When trying to build gmp 4.2, ./configure is performed without errors, but make is ...
0
votes
1
answer
92
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....
2
votes
1
answer
173
views
Cannot link to just libglfw.so (Have to include libglfw.so.3 as well)
I am making a small application with glfw. I'm not using CMake and instead opted to make a custom build system for more control, but I'm getting an error when trying to run my program:
error while ...
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 ...
0
votes
0
answers
81
views
How to compile an Assembly programm when using other libraries
When I try to use the InitWindow function from raylib using this code:
global _main
extern InitWindow
extern _ExitProcess@4
section .data
title db "Window Title",0
section .text
_main:...
1
vote
1
answer
74
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
38
views
ecoinvent 3.9.1 cutoff won't link with biosphere3 (brightway2)
End result is a ecoinvent 3.9.1 cutoff database with all it's datasets in BW2 (within my project) but without being correctly interlinked with biosphere3; This results in 0.0 LCIA scores if I want to ...
0
votes
0
answers
80
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
1
answer
50
views
g++ source code changes not recognized in gdb/linker
Win 11-64 Pro v24H2
Cygwin version 3.7.0-0.116
g++ version 15.1.1
gdb version 15.2
This has me stymied. I don't know enough to create a test case.
I am created an API (cygslip.dll) which I ...
0
votes
0
answers
74
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
125
views
Rust Linker is not finding included FFI library during cucumber test compile
So we have a cucumber test crate that tests an FFI crate.
We include the FFI library in the cargo.toml file with :
ffi_lib = { path = "../base/ffi_lib" }
Then its linked into the code via:
#...
0
votes
1
answer
68
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 ...
0
votes
0
answers
74
views
Visual Studio 2019 LINK : fatal error RC1106: invalid option: -ologo
Till yesterday, I was using VS 2019 16.7 and later evening I upgraded to VS 2019 16.11.
After that I started getting this error.
1>Generating Code...
1>LINK : fatal error RC1106: invalid option: ...
1
vote
0
answers
98
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 ...
2
votes
2
answers
91
views
Multiple definition linking error on macro expansion with expansion guards
I have a header file that introduces a macro that declares a Stack structure and some asociated functions that work with that struct. Header file (Stack.h) content is shown below:
#ifndef STACK_H
#...
0
votes
0
answers
574
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' => ...
2
votes
1
answer
101
views
Linker cannot find references to defined functions between automatically generated objects in Makefile
I ran into a problem when the linker complains about undefined reference to <function> after compiling all the objects and files, even though functions are declared and defined. I've been ...
1
vote
1
answer
76
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/...
-3
votes
1
answer
83
views
Macros and functions can't be found in .h file [closed]
I'm trying to run the following example code in Visual Studio:
#define MA_NO_DECODING
#define MA_NO_ENCODING
#include "miniaudio.h"
#include <stdio.h>
#ifdef __EMSCRIPTEN__
#include &...
-6
votes
1
answer
144
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 ...
0
votes
0
answers
57
views
How do I link my c++ files to work together? [duplicate]
Main.cpp file
#include <iostream>
#include "RetailItem.h"
#include <iomanip>
using namespace std;
//getData function prototype
void getData(string &desc1, string &desc2,...
1
vote
1
answer
71
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 ...
0
votes
1
answer
75
views
Why do circular dependencies break linker in ESP-IDF
I have a project under ESP32 using the ESP-IDF framework, version 5.4
My project has several submodules which are built as static libraries and linked. Until now, things have been working very well.
...
5
votes
0
answers
146
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 ...
2
votes
1
answer
705
views
Can't link to SDL3 using MinGW [closed]
I build using following command
gcc project.c -IC:\Users\john\SDL3-3.2.2\x86_64-w64-mingw32\include -LC:\Users\john\SDL3-3.2.2\x86_64-w64-mingw32\lib -lSDL3 -o project
the project file is simply
#...
0
votes
1
answer
190
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
1
answer
316
views
"cURL Library Execution Failure: 'libcurl-x64.dll Not Found' Despite Correct Compilation and Environmental Path Setup on ARM-based Windows Surface 7"
I am trying to use the cURL library(I am pretty new to libraries so I apologize for my ignorance). I use the command:
g++ -I"C:/Curl/include" distance.cpp -o run -L"C:\Program Files\...
0
votes
0
answers
87
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/...
0
votes
0
answers
107
views
how to resolve an "undefined reference" error that is not fixed by marking the function as weak
I have read a number of SO posts on this but they do not answer the question of why an "undefined reference to ..." error can persist after marking a function as weak.
I have a header file:
#...
1
vote
0
answers
155
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: ...
2
votes
2
answers
337
views
Linker error: duplicate symbols from libucrt and libmmt, but need both
I'm trying to build a project with the Intel OneAPI 2024.2.1 compiler.
My 32-bit release build has the issue of multiply defined symbols.
There's a few math functions that are causing problems:
lld-...
1
vote
1
answer
91
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 /...
0
votes
0
answers
25
views
How to link Abaqus to MATLAB libraries?
I am currently working on writing a UMAT subroutine. In one part of the code, I need to solve a system of linear equations. Initially, I used Fortran libraries such as LAPACK and PARDISO for solving ...
1
vote
1
answer
89
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 ...
0
votes
0
answers
102
views
Linking to stdc++fs (std::experimental::filesystem) doesn't work
This is my CMakeLists.txt file for a project I am trying to run, everything seems fine up until the filesystem library, I tried a couple of things and what worked for me is the std::experimental::...
1
vote
1
answer
161
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 ...
3
votes
2
answers
305
views
VTK project report "undefined reference" errors
I want to run a simple VTK8.1.2 demo on Centos7.9-2009 to test the VTK package for my project. Here is the demo:
#include <vtkSmartPointer.h>
#include <vtkRenderer.h>
#include <...
2
votes
0
answers
112
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 ...