29,371 questions
1
vote
0
answers
73
views
C++Builder with BluetoothLE dongle using Windows 11
How can I get a PC to operate BluetoothLE using C++Builder on Windows 11 and a Bluetooth 5.3 UB500 dongle?
I have installed CMake 4.0.3. I have downloaded SimpleBLE from GitHub. In a Command Prompt, I ...
0
votes
2
answers
192
views
How to find path to a library installed through nix flake
I am working on a c++ project using nix flakes, this is the basic flake I have developed :
{
description = "flake for an autonomous rover";
inputs = {
nixpkgs.url = "github:...
0
votes
0
answers
186
views
CMake ERROR in building a package in nix flake
I am currently working on a c++ project using nix flakes. I am using a state machine library known as YASMIN (https://github.com/uleroboticsgroup/yasmin). While trying to build this package in nix I ...
1
vote
1
answer
168
views
How to specify C++-module-implementation file in CMakeLists.txt? [closed]
I want to create a c++-20-module without partitions but where the interface is in a different file than the implementation. This is my setup:
interface file ModuleTest.ixx:
export module moduleTest;
...
-1
votes
1
answer
53
views
Error C1010 When using Precompiled Headers and adding new Source Files [CMake] [Visual Studio]
I have the following problem: I enabled precompiled headers for my CMake project using target_precompile_headers(${APPLICATION_NAME} PRIVATE include/precompiled/pch.h) . This worked, however only for ...
0
votes
0
answers
63
views
ClassNotFoundException when calling custom Java class from Qt for Android using JNI
I'm developing an Android app using Qt 6.9 that needs to scan WiFi networks. I've created a custom Java class to handle the WiFi scanning, but when I try to call it from C++ using QJniObject, I get a ...
0
votes
0
answers
77
views
dotnet build command overrides C# dll name
I have a c++ cmake project with multiple subprojects, one of those is ScriptCore which is just a ScriptCore.csproj and a few .cs scripts. The cmake file for this subproject runs the following command:
...
0
votes
1
answer
279
views
How to make config.cmake file of SDL3 and ImGui
Currently I'm trying to add SDL3 and ImGui to my 2D game engine's config.cmake file.
I would like to use that library as below from external project.
find_package(MyEngine REQUIRED)
add_executable(...
0
votes
0
answers
39
views
How to link libgit2 as a submodule using cmake
I am working on simple minecraft launcher
https://github.com/skorakora/ZielonaAlkaidaLauncher
I would like to add libgit2 to it as git submodule.
I have tried
"git submodule add ``https://github....
0
votes
0
answers
104
views
Trying to build cmake - getting "defined in discarded section" when linking?
So to set the stage (and it's a strange stage...) this is on NetBSD, using pkgsrc, and on hppa architecture. I build this the same way on sparc without issue.
On hppa, I get:
`_ZL17__gthread_triggerv'...
1
vote
0
answers
267
views
SDL program can't find available video device on NixOS
I'm using NixOS and trying to learn SDL, yesterday I got a code example to build and work but today it stopped working, I tried rebuilding everything in a different directory with no success. I'm ...
3
votes
1
answer
259
views
Using CMake, how can we check if ".h" files are "self-contained" (as per guidelines)?
There is the following C++ Core Guideline:
Header files should be self-contained
In large project, how can we automate this check, I would like to avoid having to add empty .cpp files for every &...
0
votes
1
answer
146
views
How to install leptonica 1.85 in Debian 12
Tried to use https://github.com/Sicos1977/TesseractOCR Nuget package in Debian 12. It looks that it requires new version of leptonica libleptonica-1.85.0.dll.so which is not avaliable in Debian:
#apt ...
2
votes
0
answers
296
views
error when trying to include llama.cpp to my C++ application in windows using vcpkg
I am trying to write a simple application that uses llama.cpp and I am including it to my application using cmake and vcpkg.
My CMakeList.txt is:
cmake_minimum_required(VERSION 4.0)
if(WIN32)
File(...
0
votes
0
answers
66
views
wxWidgets on Linux and its Release to vcpkg
I have two related questions:
I am on a Linux Mint OS and trying to install wxWidgets from vcpkg and having problems. Has anyone achieved to install wxWidgets from vcpkg on Linux? Are there ...
2
votes
1
answer
69
views
How can I leverage CMake to run my executable without copying resource files around?
I cant seem to find a solution to match file paths against the src directory instead of build, without getting cmake to change its binary output target.
Currently if I do myproject/src/asset/asset.* ...
3
votes
1
answer
329
views
In a VSCode / CMake Tools project, can I configure Intellisense to exclude source files not included in the current CMake preset?
I have a VSCode project using CMake Tools that utilizes CMake presets. Each preset corresponds to a different target platform, and therefore includes a different set of source files to be compiled.
...
0
votes
1
answer
61
views
Linking a curl static lib using cmake at Clion Windows
I'm noob at C and cmake and experience difficulties with a lib linkage. I have the following cmake:
cmake_minimum_required(VERSION 3.10)
project(EC C)
set(CMAKE_C_STANDARD 11)
add_executable(EC main....
3
votes
1
answer
88
views
scikit-build-core ignores .pyf files when building Python modules: why?
I maintain a Python module here and I'm having difficulty getting it to build correctly. I'm currently trying to switch from the old numpy distutils over to scikit-build-core on the change-setup ...
1
vote
0
answers
49
views
setting a git safe.directory during cmake FetchContent_MakeAvailable
tl;dr during cmake command FetchContent_MakeAvailable, an underlying git checkout tag proces fails with fatal: detected dubious ownership in repository at ...; how can I have cmake set a git safe....
0
votes
0
answers
30
views
How to read a variable returned from a python script that was run in build phase
I am a newbie to cmake. This is what I'm trying to achieve:
Run a build command that would generate an elf file.
Trigger a python script to run after the elf has been generated - as it takes the elf ...
0
votes
1
answer
60
views
Cmake with Conan Multiple Includes Retain Path
I am trying to create a library or possibly better to make two libraries. The file structure is below (with generic names). I am trying to get the ExampleProject to be able to include messageA.h, ...
1
vote
1
answer
218
views
How to get Qt Creator to support C++20 in its editor with CMake
I have a CMake-based Qt project that I'm developing with Qt Creator. Recently I enabled C++20 support with CMake via
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(...
-1
votes
1
answer
265
views
My program looks compiling in C++ 20 but cannot include <format> (to call std::format) [duplicate]
I've trained myself on a C++ 17 book on a project made of multiple executables in order to run each of them thing quickly. Today, to handle a new source Copies.cpp I've asked for C++ 20.
(CMakeLists....
1
vote
1
answer
80
views
When use coro library, got error: ‘io_scheduler’ is not a member of ‘coro’
In my CMake project I use "coro" library. But when compile the project I got following errors:
/root/uwu/include/picohttp/server.hpp:58:58: error: ‘io_scheduler’ is not a member of ‘coro’
...