1,325 questions
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
103 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
92 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
46 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
90 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
135 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
231 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
215 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
67 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
375 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
130 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
163 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 ...