#Hi, who can help me to add cpp libraries to project?
65 messages · Page 1 of 1 (latest)
what library for example?
there is vcpkg, its a dependency manager that you can use
you added the tags linux, windows, mac, on what operating system are you?
maclindows

I'm on windows, but this is will be good and for another peoples on mac and linux
okay then use vcpkg
on linux you can use package manager
apt for example
Can I use gradle?)
@heady swift has reached level 1. GG!
Or can I use vcpkg with gradle?
xtd library
Now I will send link
Description will go into a meta tag in
How i can add this lib to my project
that is for java
Download the latest stable xtd version
there is documentation on how to use
Gradle can compile cpp projects
Yes, but I used gradle and I have downloaded this library and unarchived
And I transform it in my project, but when I run gradle build - crash happens
thats new to me
i cant help with gradle :{
people usually use cmake because cmake is cool
Okay, How i can use cmake, and how I can install dependencies with it? As minimum, references
@heady swift has reached level 2. GG!
create a CMakeLists.txt
wait, what ide do you use?
Now I was trying install cmake and vcpkg, and have it's installed, but when I trying to build cmake real project with vcpkg imported xtd library, I have error in command line
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
Share your CMakeLists.txt
cmake_minimum_required(VERSION 3.20)
project(virtux-desktop-boot)
find_package(xtd REQUIRED)
add_executable(HelloWorld main.cpp)
target_link_libraries(HelloWorld PRIVATE xtd::xtd)
CMakePresets:
{
"version": 2,
"configurePresets": [
{
"name": "default",
"generator": "MSYS Makefiles",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
}
]
}
MSYS Makefiles is changed by me from Ninja
but no working
it looks like it, but it still doesn't make much sense to me.
cmake --preset=default
Preset CMake variables:
CMAKE_TOOLCHAIN_FILE="D:\Общее\Programs\vcpkg/scripts/buildsystems/vcpkg.cmake"
-- Running vcpkg install
All requested packages are currently installed.
A suitable version of 7zip was not found (required v24.6.0) Downloading portable 7zip 24.6.0...
Downloading 7zip...
https://github.com/ip7z/7zip/releases/download/24.06/7z2406-extra.7z->D:\╨Ю╨▒╤Й╨╡╨╡\Programs\vcpkg\downloads\7z2406-extra.7z
Downloading https://github.com/ip7z/7zip/releases/download/24.06/7z2406-extra.7z
Extracting 7zip...
Total install time: 900 ns
-- Running vcpkg install - done
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.40.33811.0
-- The CXX compiler identification is MSVC 19.40.33811.0
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_CXX_COMPILER could be found.
-- Configuring incomplete, errors occurred!
It with this CMakePresets:
{
"version": 2,
"configurePresets": [
{
"name": "default",
"generator": "Visual Studio 17 2022",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
}
]
}
Preset CMake variables:
CMAKE_TOOLCHAIN_FILE="D:\Общее\Programs\vcpkg/scripts/buildsystems/vcpkg.cmake"
-- Running vcpkg install
All requested packages are currently installed.
Total install time: 900 ns
-- Running vcpkg install - done
CMake Error: CMake was unable to find a build program corresponding to "MSYS Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_AR was not found, please set to archive program.
-- Configuring incomplete, errors occurred!
Its if
{
"version": 2,
"configurePresets": [
{
"name": "default",
"generator": "MSYS Makefiles",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
}
]
}
but i have installed msys2
with gcc, g++, gdb etc.
Can you please use code blocks next time?
Change virtux-desktop-boot to HelloWorld
It changed, but difference not was
@heady swift has reached level 3. GG!
Error occurred still
did you add ninja to the PATH?
already yes
and still the same error or no error arnymore?
still
Thanks for your time and trying to help me, I have now tried using and running Rust and I am happy)
maybe you come back to c++ sometime, who knows 🙂