24 questions from the last 30 days
0
votes
0
answers
193
views
How do I set up my C++/Cmake project in Visual Studio Code so that I can run and debug it on Windows?
I'm trying to put together a small utility for computing a tetrahedralization of a mesh (https://github.com/blackears/cyclops_tetrahedralizer). Since I want this to be open source, I thought it would ...
2
votes
1
answer
134
views
CMake Error: Error required internal CMake variable not set ... _CMAKE_CUDA_WHOLE_FLAG
I'm trying to configure a project of mine involving CUDA, like so:
cmake \
-DCMAKE_CUDA_ARCHITECTURES=61 \
-DCMAKE_BUILD_TYPE=Release \
-DCUDAToolkit_ROOT=/usr/local/cuda-11.6 \
-DCMAKE_CUDA_COMPILER=/...
4
votes
0
answers
150
views
Why executable can use module when respective library is linked only by excutable dependency not by executable itself
There's an implementation of the foo module that uses only the standard library:
module;
#include <iostream>
export module foo;
export void foo() {
std::cout << "foo" <&...
0
votes
0
answers
141
views
Linker can't find cv::imshow()?
I'm having some trouble compiling programs using the opencv 4.13 libs that I manually compiled and installed. Particularly, the problem seems to be in the functions:
cv::cvtColor
cv::putText
cv::...
1
vote
1
answer
94
views
VCPKG causes configuration time to explode, despite each on their own not taking time, how to debug?
I'm on RHEL8, and a while back, I used to have no issues. At some point something about the system changed and I started having issues with slow CMake generation times, which eclipsed my compile ...
0
votes
0
answers
134
views
gtest compile error: undefined reference to __imp__Exit
I encountered this error when trying to compile a Gtest application using MinGW on Windows:
[build] D:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/...
-1
votes
1
answer
81
views
Problems compiling code with cmake and Boost / OpenCV
I'm having some problems compiling a simple piece of code. I'm just starting to use cmake (before I only used handcrafted Makefile) and compiling this piece of code in my PC works normally.
Code:
#...
0
votes
1
answer
48
views
GCC+CMake, static lib changes size_t footprint
While refactoring some legacy code I ran into some strange behaviour of CMake+GCC that I can not explain or correct.
This is what I have:
Debian Trixie with GCC 14.2.0 and CMake 3.31.6
A test project ...
-3
votes
1
answer
75
views
Is it possible to build bgfx with cmake? [closed]
I’m trying to build bgfx using CMake, but I’m not sure whether this is officially supported or what the correct workflow is.
From what I understand, bgfx primarily uses GENie to generate project files,...
0
votes
0
answers
59
views
How do I tell CMake to emit the paths the package config module searched in
I've read this question:
How do I tell CMake to output the package search paths?
and can now more easily debug package searches. However, I'm searching for a certain package using pkg-config, e.g.:
...
0
votes
0
answers
81
views
CLion can't find MSVC build tools, despite autodetecting the directory
This is my first time using CLion and it found the toolset for Cygwin and MingGW, but not for Visual Studio. I've used and can still use Visual Studio 2019 and 2026 and for C++ development with no ...
1
vote
1
answer
44
views
In CMake, how do I check which libc version my C compiler uses?
In a project I'm working on, I need to determine which libc is being used, for reasons.
I know that, on current Linux systems, I can usually write:
$(gcc --print-library=libc.so.6) | head -1
and get ...
0
votes
0
answers
90
views
LNK2001 unresolved external symbol __vcrt_initialize when building python3 via vcpkg with custom ASan triplet (MSVC)
I am trying to build my project dependencies (gRPC and Boost) using vcpkg with AddressSanitizer (ASan) enabled on Windows. To achieve this, I created a custom triplet named x64-windows-asan.cmake.
...
1
vote
0
answers
58
views
Linking an Android shared native library to another
I'm trying to create an Android build for a native (C) library (https://github.com/MayaPosch/nymphrpc). This library has itself a dependency on another C library, Poco (https://github.com/pocoproject/...
1
vote
1
answer
42
views
What explains the strange behavior of arguments in CMake macros (as opposed to functions)?
Here is a piece of cmake code:
macro(my_macro p)
message("--my_macro--")
message("p is: ${p}")
if(p) # <========================= (1)
message("\"if(...