1,324 questions
1
vote
5
answers
179
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
77
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
1
answer
87
views
Undefined reference for .quad $symbol in AT&T assembly
You all were kind enough to help me recently with understanding this language a bit better. I'm working on AT&T syntax x86_64 assembly language through an Apress book. The author gives this code, ...
0
votes
0
answers
45
views
undefined reference to `__imp_CoCreateInstance' on mingw-w64 [duplicate]
I have tried compile win32 app with mingw-w64.
But it raises an error
undefined reference to __imp_CoCreateInstance' on mingw-w64.
My mingw-w64 installation does exists on C:\mingw64 directory.
And ...
0
votes
2
answers
76
views
MinGW and wmain: undefined reference to `WinMain@16'
This is revisiting an issue that I thought I had already addressed, but apparently not.
I use MinGW toolchain, typically the TDM variant, to avoid issues with unavailable libraries.
I'm converting ...
0
votes
0
answers
42
views
undefined reference to `MRSW::Core::multiply(unsigned long long, unsigned long long)' [duplicate]
I am trying to create a support function inside a nested namespace, but when I call this function in test.cpp, I keep getting the below error:
D:/GitHub/MRSW/test/test_core.cpp:23: undefined ...
1
vote
0
answers
133
views
issue with including cimgui backends
I'm making a program that uses OpenGL and SDL2 in C and wanted to use Cimgui as my gui library however, when trying to include the correct backends I'm getting these linker errors:
main.c:104:5: ...
-1
votes
1
answer
223
views
Undefined reference to std::cout? [duplicate]
I started with the easiest piece of code
#include <iostream>
using namespace std;
int main() {
cout << "Hello World!";
return 0;
}
I setup VScode to run C++ and this is ...
0
votes
0
answers
116
views
Undefined references when building gnina?
I'm trying to compile Gnina on my cluster session (CentOS V7, SLURM, no root/sudo access, GPU Nvidia Cuda 12.2)
I install all dependencies and compiled them with success, but when it come to the final ...
0
votes
1
answer
212
views
C++ undefined reference to `typeinfo for int' when throwing exception without the standard library
For a project I'm working on, I'm writing a mini standard library replacement. For this, I'm currently trying to implement exceptions. So, I wrote the following minimal code
int memory[4];
void* ...
-2
votes
1
answer
65
views
undefined reference to Xlib and Opengl symbols under WSL [duplicate]
I have some issues with linking X11 and Opengl libraries while cross-compiling application for Linux under WSL using Visual Studio 2022.
It seems that all settings are correct, the X11 and Opengl ...
1
vote
1
answer
374
views
I've built a different GCC version than the system's, and now get "undefined reference"s and "DSO missing from command-line"
I've built GCC 14.2.0 from sources, on an Oracle GNU/Linux 9.4 machine (whose distribution compiler is GCC 11.4.1). The build went fine; but when I now try to use it to build some library, I get:
/usr/...
1
vote
0
answers
38
views
c++ probleme when compiling a basic programm using raylib [duplicate]
Hello I'm starting to learn c++ for game development purpose so I downloaded a template on GitHub that draw a ball, bouncing on the edge of the window like the "dvd logo" using the raylib ...
0
votes
1
answer
128
views
unusual error while linking Howard Hinnat's date time library
I am trying to link following code
#include "date/tz.h"
#include <chrono>
#include <iostream>
int
main()
{
using namespace date;
//using namespace std;
//using ...
0
votes
1
answer
158
views
Issue Using MuParser in Qt Creator Project for C++
I am trying to include MuParser in my Qt Creator project, but I have been struggling for quite a while to get it working properly.
Where I am now, it appears to be unable to find several symbols in ...
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 ...
3
votes
2
answers
285
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 <...
1
vote
0
answers
29
views
"Undefinded reference" for functions in my code. Why my compiler can't find it? [duplicate]
I'm writing a program for my C programming classess and my profesor didn't really explain to us how to make functions and "import" them to our main file. I'm keep getting error with ...
0
votes
0
answers
79
views
Octave build doesn't link LAPACK properly
I am trying to install Octave 9.2.0 in a specific directory since I'm not root, including BLAS, LAPACK and FFT3W. I work on RedHat 7.
The BLAS and LAPACK libraries are available under openblas which I ...
1
vote
0
answers
45
views
Undefined references to OpenCV functions? [duplicate]
I have a simple C++ code 'myscript.cpp':
#include <iostream>
#include <opencv2\opencv.hpp>
using namespace std;
int main(){
cout << "hello everyone" << endl;
...
1
vote
1
answer
249
views
CUDA Thrust object shared between .cu and .cpp files
It seems that recent changes to Thrust (part of CUDA Toolkit) were made to tag the host_vector class name with the compile time CUDA architecture. This creates an issue (undefined reference) when ...
0
votes
0
answers
29
views
I am attempting to set up SFML in VSC but it isn't linking properly [duplicate]
The following is my tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": &...
0
votes
0
answers
65
views
Undefined references when linking Fortran object to C compiler with Intel MPI and Intel compilers
I inherited a rather large project that I am trying to get to compile (it's a bit old, maybe 10 years). I am trying to use new intel compilers with intel mpi on Ubuntu WSL.
There are some C modules ...
1
vote
0
answers
124
views
GCC cross-compile - undefined reference errors
Update 2: So the undefined reference to __end is this:
opt/i386-pc-coff/lib/ndp//libc.a(brk.o):(.data+0x0): undefined reference to `__end'
But when I do objdump of that libc.a file, I see it defined.
...
0
votes
1
answer
161
views
Could not find packetfu-2.0.0, pcaprub-0.13.3 in cached gems or installed locally
hello everyone i'm new in ruby , i am using rubyMine 2024.2.3 , with rubyinstaller-devkit-3.2.5-1-x64_2
i've been tryin to run a command using terminal , and this the error message that's shown
Could ...
0
votes
1
answer
56
views
Undefined reference to glutX in C [duplicate]
The following C code:
#include <GL/glu.h>
#include <GL/glut.h>
void Draw() {
}
int main(int C, char *V[]) {
glutInit(&C, V);
glutCreateWindow("Basic OpenGL Program");
...
3
votes
2
answers
134
views
Undefined references to mpfr_*() functions when trying to use Boost Multiprecision in a CMake Project?
I want to use Boost Multiprecision in my C++ project, but I am unable to. I suspect I haven't added the correct dependencies in my root CMakeLists.txt configuration, the relevant part of which look ...
0
votes
1
answer
118
views
Undefined reference when trying to link to static pre-built library Noesis in Cmake (c++, CLion, windows)
I am trying to start using the GUI library Noesis in my game, and am currently in the process of integrating it into my project. Unfortunately, during linking, all of the Noesis functions I have used ...
-1
votes
1
answer
51
views
Undefined Symbol To Static Const Member Variable in std::pair Construction [duplicate]
When populating an unordered map of int pairs, creating a std::pair object with a static const class member seems to cause an undefined symbol error, but only in the std::pair constructor call. If I ...
1
vote
1
answer
291
views
raylib c++ rundefined referance to InitWindow and all functions of raylib
c++ compiler: default mingw from sourceforge
code editor: vscode
myFileStructure:
*build/
├── _deps/
│ ├── raylib-build/
│ ├── raylib-src/
│ │ ├── CHANGELOG
│ │ ├── include/
│ │ ├── ...
0
votes
0
answers
73
views
Undefined references to SDL symbols? [duplicate]
I am trying to create a project in the C89 language using the SDL2 library:
#include <SDL2/SDL.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
// Initialize SDL
if (...
0
votes
0
answers
199
views
After Compilation I got the Error on VScode [duplicate]
Executing task: C/C++: gcc.exe build active file
Starting build...
cmd /c chcp 65001\>nul && C:/MinGW/bin/gcc.exe -fdiagnostics-color=always -g C:\\Users\\mohmm\\Downloads\\Programs\\my....
0
votes
1
answer
83
views
Cannot make program when using sensehat libsense library
I currently have a raspberry pi hooked up to a sense HAT and I installed this sensehat library so I could do stuff with my sense HAT in cpp rather than python. Unfortunately I am encountering a ...
-1
votes
1
answer
74
views
I keep running into an error with AMPL wherein whenever I try to model my mod file I get an error: d is not defined [closed]
I keep running into an error with AMPL wherein whenever I try to model my mod file I get an error:
giap.mod, line 23 (offset 1996): d is not defined
context: {(d, b) >>> : <<< d ...
0
votes
0
answers
180
views
Undefined Reference For RayLibs when linking with CMake?
I'm trying to use CMake to setup a simple project linking raylibs. Whenever I try to run my main I keep on getting undeclared references to my function calls:
/usr/bin/ld: /home/doppler/C++ Projects/...
0
votes
1
answer
243
views
Application fails to link with library linked against OpenImageIO
I have a library that uses many dependencies managed by vcpkg. I have never had any issues until I recently added OpenImageIO.
On Windows 10 (MSVC 17.6) my library builds and links successfully, and ...
1
vote
0
answers
93
views
undefined references using gcc link-time optimizer
I'm tring to use gcc link-time optimizer, but encounter some issue related to the gcc linker cannot correctly resolving references to symbols in 'newlib_syscalls.c'. However, same source code , ...
0
votes
1
answer
465
views
Why am I getting "undefined reference" errors trying to use OpenCV in Qt Creator with MinGW?
Just started to use OpenCV and Qt. When I use Qt 6, according to the routines in the book entered the corresponding code, but in the compilation stage has been reported an error. Originally I thought ...
0
votes
0
answers
108
views
OpenCV Include doesnt deliver references to cv Functions (undefined reference)
i just got started with c++ and have been trying to use OpenCV for an GUI.
I installed Cmake, Ninja and OpenCV into my C:/ directory. I now planned to Build the Project but i get an error in the ...
0
votes
2
answers
364
views
Undefined references when linking Google Benchmark with g++ on Windows (MSYS2) using vcpkg
I'm trying to use Google Benchmark with the g++ compiler on Windows. I installed the library using the vcpkg package manager with the triplet x64-mingw-static.
Here is the command I used to install it:...
0
votes
0
answers
443
views
Undefined reference when linking to mingw libraries
I have installed MinGW and CMake with MSYS2 UCRT64.
I have repeatedly failed to build a GUI application using several libraries: IUP and NAppGUI.
All the problems are of the type, "undefined ...
0
votes
2
answers
417
views
building OpenCV on Ubuntu (Undefined reference to `g_memdup2’)
How would you safely go about what appears to be an outdated (or too new) version of libpangosft on Ubuntu, when building OpenCV from source on Ubuntu 22.04?
[ 18%] Linking CXX executable ../../bin/...
0
votes
0
answers
240
views
Undefined reference to SDL_main()?
I was just trying to set things up on VS Code for C++ and SDL. I install chocolatey to install make.
I also installed all the things required.
but now this happened.
Whenever I run the command make ...
1
vote
1
answer
298
views
Use OpenCV in qt qmake project: undefined reference
I want to use OpenCV in a QT qmake project. The vrsions are opencv 4.9.0 and QT 5.15.2(MSV 2019,64bit).
.pro file
INCLUDEPATH += C:/opencv/build/include
LIBS += -LC:/opencv/build/x64/vc16/lib \
...
0
votes
1
answer
93
views
Undefined reference to clFFT
I am trying to use clFFT
so I could calculate FFT on GPU
I use Msys2 MinGW64 (mingw-w64-x86_64) and Cmake
and OpenCL works fine for me (I use AMD GPU) and installed OpenCL with pacman: pacman -S mingw-...
0
votes
1
answer
731
views
"undefined reference to av···@···"ffmpeg error,when i cross compile opencv4.5.3 which include ffmpeg lib
I'm working on an embedded deployment project, doing object detection work on a real-time video stream. So I have to port my C++ inference program to the RKNN1808 platform. I compile this program with ...
1
vote
0
answers
108
views
QT undefined reference to external lib function
I'm new to c++ and currently trying to create QT login-register GUI app with hashing passwords. For Bcrypt I'm using this library
So, I copied it, created binaries with CMake GUI and than builded them ...
-1
votes
1
answer
81
views
Error: `undefined reference` to function with array and function pointer as parameters [closed]
Each time I call the force function I get an undefined reference; collect2: error: ld returned 1 exit status.
Here is the declaration of the force function above the main function in main.cpp:
void ...
0
votes
0
answers
34
views
C++ Loop Iteration and Undefined Reference [duplicate]
Please note that this is a .cpp file that is being worked on as part of a larger program. To my knowledge, all other files work correctly. This is being done in Visual Studio Code.
Code:
#include &...
0
votes
0
answers
114
views
Undefined references when linking against GLFW?
Important: I didn't use Visual Code (much info in Internet about OpenGL setting up is related to this IDE) (I use VSCode).
As I got, there is OpenGL realization (GLFW) and OpenGL loader, that load ...