Category "c++"

Why does CMake default to Program Files x86 when compiling 64 bit program?

I am trying to build and install a basic program with CMake 3.17.2 for 64 bit windows with Visual Studio 16 2019. CMakeLists.txt: cmake_minimum_required(VERSION

Provide run time environment variable path (e.g. LD_LIBRARY_PATH) to third party dependency in bazel

In the code base I am working with we use the oracle instant client library as a third party dependency in Bazel as follows: cc_library( name = "instant_cli

Is there some agreement about memory allocation?

class http_client { public: void init(const char url*); void download(); } int main() { http_client c1; { char url[] = "www.example.com

Expand variadic template template parameters for use in e.g. std::variant<T...>

This will be a hard nut to crack. I don't even know if it's possible. My goal is to create a receive function that listens to multiple queues and pastes the obj

Can std::ranges be used with std::list

I note that many algorithms can be used with ranges allowing the use of members of custom types, rather than needing lambda functions. So, am curious whether st

create shared library with main to call undefined function and provide function body in other project

I need to create a shared library using cmake, and I must call function run() in a library function. But the project which uses this library should provide the

Question about exception guarantees for custom operator=

I have a class used to work with disk data consisting of an enum class and vector<char> sized based on the enum. The enum is an invariant for each object

CLBlast library not working on Mingw-w64 with Nvidia GPUs

I am trying to run the example samples/sgemm.cpp from the CLBlast repo on Windows 10 with a Nvidia graphics card. I have obtained the cl.hpp from the link. The

orocos ros integration, createStream causes execution to stuck in a loop

I'm integrating orocos with ros, basically i created a component that read data from some input ports and write on output ports that create streams, because i w

Qt missing OpenSSL 3.x support on Ubuntu 22.04

I tried to build my application which uses QNetworkManager to communicate to a server. I did not have any problems on older Linux versions but with the newest U

How do I get rid of the default macOS menu items in wxWidgets?

"Toggle Sidebar" is the only item I have added, how do I remove the other items which I don't really need? I'm stuck I'm on macOS 12.2 with wxWidgets v3.1.5 her

Can g++ (gcc) 11 be used on Debian Bullseye?

Can g++ (gcc) 11.1 be used on Debian Bullseye? Debian 11 (bullseye) is soon to be released, and I am interested in a compiler with C++20 and modules support. De

Interface and implementation decoupling

I'm working on an cross-platform embedded project and I don't want to use abstract classes and virtual tables to separate interface from implementation. I disco

Mount a CIFS client/connection with sys/mount

I am trying to make a CIFS connection between my Ubuntu client desktop and my Windows 10 server Desktop, so I can share folders and files though a local network

How to find the amount of numbers, lowercase and uppercase letters from a file?

I am attempting to write a program that counts the amount of lowercase letters, uppercase letters and numbers from a .txt file but I am running into some issues

class's friend function are incompatible?

IDE throws warning that the class's friend function are not compatible with the function's declaration outside of class. What is the cause for the warning? name

How to acquire pointer to associated mutex

I'm working with mutex and when building the code, its throwing an error: 'error: use of deleted function ‘std::mutex::mutex(const std::mutex&)' I und

visual studio error e1696 -"cannot open source file iostream"

When I build a cmake project in visual studio and this error occurs, I tried to uninstall and reinstall visual studio but it did not work. the Build succeeded a

Initializing container of unique_ptrs from initializer list fails with GCC 4.7

I am trying to initialise an std::vector<std::unique_ptr<std::string>> in a way that is equivalent to an example from Bjarne Stroustrup's C++11 FAQ:

how to configure bazel toolchain for cross compile use rules_foreign_cc

my project need cross compile for arm aarch64 on ubuntu x86_64, but failed at configure stage, below is log log # Execution platform: //platforms:linux_gcc9_aar