Questions tagged [linker-errors]
An error received when combining individually compiled object files into executable code.
3,929
questions
-1
votes
0
answers
31
views
Linker can't find SDL2 and SDL2main? [duplicate]
I was using SDL2 for C++ and I ran the code and I keep getting so much errors.
I think it's the compilation that's the problem. I'm using VS Code and MinGW-w64 (Actually I'm using a "package"...
0
votes
0
answers
17
views
When using imread, I can't build
I've made a project on esp-idf for the ESP32-CAM AIthinker, which uses a portable version of OpenCV seen in text.
Everything seems to be working fine, except for the function imread().
Whenever I put ...
0
votes
1
answer
82
views
Xcode 15 linker fails with undefined symbols but no symbols listed
I am rebuilding a project that was list build 2 years ago after upgrading to Xcode 15. Build fails with the following message:
...
Undefined symbols:
Linker command failed with exit code 1 (use -v to ...
-1
votes
0
answers
24
views
How do I solve linking error using curl in windows (IDE Dev-c++)? [duplicate]
I am trying to compile an example code from curl command line. When I do it, I get the following errors:
[PATH]:(.text+0x17): undefined reference to __imp_curl_easy_init' [PATH]:(.text+0x37): ...
0
votes
0
answers
18
views
Linking error when compiling Rust crate tinyaudio for Android
I'm trying to compile a library that uses a Rust crate tinyaudio, and I'm getting a linking error:
ld: error: unable to find library -laaudio
I have Android studio installed and:
Android SDK ...
-2
votes
0
answers
75
views
How do I call a C++ function from C without getting a linking error? [duplicate]
I'm attempting to add functionality from a C++ library into code that's written in C. I'm compiling the C++ library as a DLL, but no matter what I do, I get the Link 2019 error:
error LNK2019: ...
0
votes
0
answers
27
views
Linker command failed with exit code 1 with Undefined symbol error
Im trying to run react native app with xcode 14.3.1. M2 MacBook pro, npm install and pod install is successfully done. but while running the app im getting this error. react native version is "...
-1
votes
0
answers
29
views
Including <iostream> causes "Error LNK2038 : mismatch detected" when done in one file but not in another [duplicate]
I have a project that has 4 classes, all with .h and .cpp files
main
block
mesh
chunk
main.cpp includes chunk.h
chunk.cpp includes block.h and mesh.h
The project is configured to be built as an ...
-2
votes
0
answers
25
views
Issues with C++ Templates [duplicate]
I am trying to create an abstract interface for Trees using c++ templates. I am facing some issues with it. Here is the code I have written:
tree.h
#ifndef __TREE_H_
#define __TREE_H_
template <...
0
votes
0
answers
17
views
Compile gdb for os161 on Archlinux
I started following the os161 course, from ops-class, and I'm having trouble setting up part of the tool-chain required to do the exercises. I tried to follow the setup guide and managed to:
install ...
1
vote
2
answers
67
views
MacOS x86_64 error with C/assembly language file: ld: symbol(s) not found for architecture x86_64 when compiling/linking assembly
I'm trying to compile this file from an open-source git repo:
https://github.com/xcist/main/blob/master/gecatsim/clib_build/src/p_nlog_inline.c
I'm on the MacOS x86_64 platform. OS v13.4
I can compile ...
0
votes
0
answers
9
views
Linker error to boost library when catkin build the rtt_ros_integration from source [duplicate]
I am using Ubuntu 20.04, ROS Noetic. When I tried to install Orocos by following the instructions in readme, and try the catkin_make_isolated --install, following error happened:
==> Processing ...
0
votes
0
answers
19
views
Error: CMake giving a linking error when all definitions are provided [duplicate]
I'm trying to compile a program with CMake, which is new to me, and it sucessfuly builds but fails in the linking stage. I have everything defined, so I'm not sure why it's failing.
Here's the ...
0
votes
0
answers
14
views
DEVC++ Makefil.win has changed. Reload from disk? ERROR
I just finished downloading the Dev C++ and my instructor told me follow his instructions (and so i did) but when i compile and run it it shows this error. idk how to fix it so can you help me?
I have ...
-2
votes
0
answers
37
views
why I am getting undefined refference errors with this singleton? [duplicate]
I am getting undefined references with the Time_Serializer class, which seems to be related to the rec_instance variable on the class. I also had to put the header code for both Time_Serializer and ...
0
votes
0
answers
20
views
How to code pthread/thread library function in AURIX TC275 in AURIX Development Studio?
I am new to coding Tricore and AURIX Development Studion. I am trying to create a thread to execute a separate function but i am not able to link the thread function.
I tried to link the thread ...
0
votes
0
answers
43
views
Undefined references to GOACC_ symbols when linking CFD solver using OpenACC
I am trying to speed up an in house Computational Fluid Dynamics solver called FEST-3D by using OPENACC. I am working on a Ubuntu 22.04 Virtual Machine(on VirtualBox) with windows as host.
FEST-3D has ...
0
votes
0
answers
39
views
Osdev linker multiple defintions inside docker error
I was planning on working on my os after a long break. Back then I was working on a amd64 system so no issues building, but now since im working on my m1 mac I have to use docker. Suprisingly i still ...
0
votes
0
answers
56
views
Building R-3.6.1 from source on Ubuntu-22.04
`Hi,
our cluster is running Ubuntu-22.04. Due to packages that require specific versions of R, I need to have R-3.6.1 available on the nodes.
Through the package manager the oldest version of R that ...
0
votes
0
answers
32
views
Bazel linking .dll for SDL2 project
I was wondering how to properly set up the Bazel target for SDL2 with the Windows dynamic and static libraries. What can I change in my BUILD file to account for the .dll files for the Windows SDL2 ...
0
votes
0
answers
78
views
strange rust-lld error in no_std environment
I'm trying to use rust-lld to link a custom kernel written in Rust and I'm getting this weird error:
error: linking with `rust-lld` failed: exit status: 1
|
= note: LC_ALL="C" PATH="...
0
votes
1
answer
328
views
Duplicate Symbol Error when Linking in Xcode: '_CRLF' | XCode 15.0 Beta 8
My app was working fine on XCode 14.6 and I was able to install it on my iPad.
For testing the app on my iPad on iOS 17 Beta, I updated both my iPad and XCode 14.6 to XCode 15 Beta 8.
Now when I am ...
0
votes
0
answers
26
views
Linking Issue with Emscripten and Ceres-Solver: "undefined symbol: typeinfo for ceres::CostFunction"
I'm working on a project that uses the Ceres-Solver library. The project compiles successfully when using a regular CMake setup. However, when I try to compile it using the Emscripten compiler, I run ...
0
votes
1
answer
47
views
CMake Linker error : undefined reference to class
I'm trying to build a project with the following structur:
└── main/
├── CMakeLists.txt/
│ └── src/
│ └── main.cpp
└── models/
└── modelA/
├── src/
...
0
votes
0
answers
71
views
GCC on Windows: Using Address Sanitizer
I'm using WinLibs standalone build of GCC and MinGW-w64 for Windows.
When I add -fsanitize=address compiler option, I get a linker error for asan library.
Here is the command line which I'm using to ...
0
votes
0
answers
10
views
/usr/lib64/libicui18n.so.50: error adding symbols:DSO missing from command line
When I'm compiling my project, I've encountered the following compile error: undefined reference to symbol 'uregex_open_50'
/usr/lib64/libicui18n.so.50: error adding symbols:DSO missing from command ...
0
votes
0
answers
37
views
Linker errors with BLAS/LAPACK symbols (snrm2_, sdot_, etc) when building Fortran project with gfortran on Windows
I'm trying to build the Elmer finite element software (version 9.0) using gfortran 10.2.0 and OpenBLAS 0.3.15 libraries on Windows 10. I'm running into linker errors when creating the shared libraries,...
0
votes
1
answer
77
views
Why can't I instantiate an object in a class?
I have these three codes:
#pragma once
class Rect
{
private:
int m_Thing;
public:
Rect(int thing)
{
m_Thing = thing;
}
void create(int thing)
{
m_Thing = ...
0
votes
0
answers
39
views
Linker doesn't detect my static library made for raylib
I am currently trying to create a tiny library to make dialog boxes in raylib. When I try to use my Makefile, though, I get this error. Please note that I'm a bit new to c++!:
/sbin/ld: cannot find -...
0
votes
1
answer
55
views
"undefined reference to `GOACC_parallel_keyed' " and related errors coming up while running make command
I am working on a project where I have to optimise the performance of a Computational Fluid Dynamic solver. We aim to use OpenACC to do so. The solver was written using fortran90 and run via terminal ...
0
votes
0
answers
28
views
Error loading wrapper for shared library in lua plugin
I’m attempting to write a C wrapper for a shared library that would expose it to lua so that it can be called by a lua plugin.
I recreated the error with minimal code, using the following four files:
/...
0
votes
0
answers
17
views
Bare-Metal : During Makefile I receive this error "..../arm-none-eabi/bin/ld: error: .: read: Is a directory"
I am using Ubuntu 22.04 to do some bare metal programming.
I have 3 files to compile and link to create a .elf file name app.elf (im using Makefile to do this).
However I encountered the error below:
$...
0
votes
0
answers
30
views
g++ failed to print meaningful error message in linking
In my environment, in failed linking case of g++, only collect2: error: ld returned 1 exit status reported:
bsl@ubuntu:~/compiletest$ g++ -v main.o
Using built-in specs.
COLLECT_GCC=g++
...
-1
votes
1
answer
52
views
Linker can't find library when using CMake
I am trying to learn CMake using a youtube tutorial
Installing the library with make install succeeded
(both /usr/local/libmearlymath.a and /usr/local/include/adder.h exist)
But when running make in ...
0
votes
1
answer
48
views
I am expecting to get duplicate symbol linker error but I don't get it, why?
As far as I know if I define a function in a header file and include that header file in multiple source files(translation units), and link them together I should get duplicate symbol linker error. ...
2
votes
2
answers
47
views
inline keyword causes linker error in Clion
I have a strange error concerning the inline keyword, this is just a sample code I wrote:
#include <stdio.h>
#include <stdint.h>
uint8_t inline LIB_MATH_BTT_u8GetMSBSetBitPos(uint32_t ...
2
votes
1
answer
107
views
Undefined reference to function, but it's all defined
I have problems with running multiple files after creating a library, which in this case I called "calcola.h".
It seems all right to me, but the error "undefined error somma, error: ld ...
0
votes
1
answer
17
views
libtcc unresolved external symbol errors
Trying to make libtcc work. Trying to run hello world example of libtcc library: https://bellard.org/tcc/
I downloaded the tcc-0.9.27-win64-bin.zip version.
I created C++ console application project ...
0
votes
0
answers
11
views
Getting a undefined reference to `SWM_Mark_Iteration(int)' error
I am trying to build a project and while linking the shared object I am getting the error
/home/bhowmik/installSoftware/swm/lib/libswm.so: undefined reference to `SWM_Mark_Iteration(int)'
The ...
1
vote
0
answers
23
views
Makefiles for X11 project on macOS with xQuartz cannot find <X11/Xlib.h>
I am trying to setup a makefile for my graphics project. I am using X11 on macOS, so I have installed xQuartz. I checked my install folder /opt/X11/ and it has everything correctly. I am able to run ...
0
votes
0
answers
43
views
How to resolve linker error: undefined symbol - C++ [duplicate]
I'm getting the same linker error when trying to run code:
ld.lld: error: undefined symbol: Serialize::Archive& Serialize::Archive::operator>><double>(double&)
main.cpp (snippets):
...
0
votes
1
answer
28
views
VC linker error - CVT1100 duplicate resource. type:MESSAGETABLE
I have been given a very old project with a series of DLLs and drivers which has not been built since 2012. I'm trying to bring it back to life but as a driver guy I'm really struggling with some of ...
0
votes
0
answers
22
views
GNU ToolChains Cross Compiler c/C++library issue
I built a GNU toolchain using the main parameter below:
build=i686-w64-mingw32
host=i686-w64-mingw32
target=x86_64-pc-elf
I used GCC 11.3 , binutil 2.40 and newlib 4.3.0
I created executives with ...
0
votes
0
answers
19
views
LAME encoder OSX cross-compile fails on Linux
I have installed osx cross compilation toolchain on my linux OS(WSL2) using the project osxcross. I am using the toolchain to compile the LAME encoder using the source code. After configuring with my ...
2
votes
1
answer
61
views
wrapping fortran in go on macOS: ld: library not found for -lgfortran
I am wrapping a fortran program in a go wrapper for modernizing scientific models, as a prerequisite this works on Windows. I got a mac and am curious on how to make it run on the M2 chip. here is ...
0
votes
1
answer
65
views
How to fix "unresolved external" linker error for System::Set in a C++Builder design-time package?
I'm using C++ Builder 11.3 patch 1.
I have a set of components, all written in C++ and no Delphi code. The components are split into run-time and design-time packages. The run-time package builds ...
0
votes
0
answers
40
views
Is it possible to set ram start address at a value higher than 0x80000000(32 bits) in riscv bare metal?
I am using a linker script to compile a program in riscv64 .I need my ram start address to be higher than 32 bits but whenever i try to modify the address in the linker script i get the following ...
0
votes
0
answers
175
views
ifort: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ifort)
I am unable to remove the following error as required package is not available in the package manager yum for centos:
ifort: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ...
0
votes
0
answers
41
views
How to link header file with template co cpp? [duplicate]
I'm trying to link declaration part to realization part, but I don't know how to do it correctly. I've found one solution in Internet, but it doesn't work. I'll really appreciate your help if you know ...
1
vote
1
answer
65
views
Unable to link C source code with Ada static library (Error: libnewapi.a(unit1.o):unit1.adb:undefined reference to `__gnat_rcheck_CE_Overflow_Check')
I want to integrate my Ada static library (libnewapi.a) with my C source code (main.c).
I do not have any issues generating the static library but when trying to link it with main.c.
I get the below ...