Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
0 votes
1 answer
85 views

How to compile multiple .cpp files in a folder using visual studio code with MinGW?

I'm trying to compile my app using vs code and g++ on windows 11 without having to type all the files manually in the task.json file, but everytime I try to compile I get a fatal error : cc1plus.exe: ...
HugeElmo's user avatar
Advice
0 votes
8 replies
141 views

Is it possible to package binary data inside the binary without having it in memory?

I recently learned about C23's implementation for #embed, so I was wondering if I can use that with extern in a c++23 program/game to have all 3d models and assets baked into the exe but not in memory ...
jade22's user avatar
  • 13
0 votes
1 answer
55 views

Why CMake failed to find krb5 while g++ succeed? [closed]

I have already install the package "krb5-devel" on my AlmaLinux. The head-files is located at /usr/include and the lib-files /usr/lib64. $ sudo dnf install krb5-devel Last metadata ...
Monhde Sau Hung's user avatar
0 votes
0 answers
34 views

VS Code not printing warnings

I'm trying to set up VS Code to learn C++. I downloaded the latest version of the compiler (g++) and tried running the following simple code, which (if I understand this correctly) should print a &...
Pickman02's user avatar
  • 101
0 votes
0 answers
41 views

g++ not showing any error for narrowing conversion with uniform initialization?

I'm very very new to C++ so I hope this question does make sense and is not too ill formed. From my understanding, the uniform initialization {} should forbid any narrowing conversion. So for example ...
Pickman02's user avatar
  • 101
0 votes
0 answers
48 views

Trouble building C++ extension for Python-3.12

The setup.py works fine with Python-3.6 on RHEL7: python3 setup.py build && python3 setup.py install --user Trying to do the same on RHEL8 with Python 3.12 (and g++ 8.5.0), however, I get an ...
Mikhail T.'s user avatar
  • 4,246
0 votes
1 answer
72 views

Analyze Backtrace of Linux Executable with separated debug files

I am currently trying to figure out how to analyze a backtrace of a Linux Executable where the Binary is stripped of debug informations but they are stored in a separate file. What I found out so far ...
Nidhoegger's user avatar
  • 5,322
0 votes
2 answers
47 views

With g++, how can I have class member symbols evaluated at runtime instead of link time?

I have a library from a vendor, for non-technical reasons this library needs to be treated as immutable. This library is used as a relatively small portion of a very large software project, but the ...
Compholio's user avatar
  • 1,062
5 votes
2 answers
261 views

Function templates leave out debug lines

I am working in a codebase that makes heavy use of templates. This causes many issues with debugging, because the compiler leaves almost no debugging information behind to tie object code back to ...
nispio's user avatar
  • 1,806
3 votes
1 answer
187 views

Building Qt6 with g++ 15 and std c++23

I am trying to build Qt 6.8.2 with g++ 15 and std standard c++23. This is my configuration command: $ export GCC_CC=/usr/bin/gcc-15 \ GCC_CXX=/usr/bin/g++-15 \ GCC_CFLAGS="-O2 -fPIC" ...
Jakob Simon-Gaarde's user avatar
0 votes
0 answers
187 views

How do you set up clangd properly with a specific toolchain?

I'm using clangd for an embedded systems project in VS Code because it works way better for what I'm trying to do than Microsoft's C/C++ extension for intellisense (and also I had a few cases where my ...
Some random guy's user avatar
1 vote
1 answer
148 views

MacOS first run of a freshly compiled C++ program is delayed by [0.2s-2s]

When compiling a program with g++ (installed via brew) on MacOS Sequoia (Apple Silicon), the first run in VS Code’s integrated terminal is visibly delayed. In comparison, the same program, when ...
3centroids's user avatar
0 votes
0 answers
132 views

Java to C++ JNI DLL error - java.lang.UnsatisfiedLinkError: ... Can't find dependent libraries

Edit to describe the solution: During development, I was making changes to my path. If running java in a Command Prompt window, then that window must be closed and a new one opened to reflect changes ...
Tommy131313's user avatar
3 votes
1 answer
106 views

Why does Clang fail to compile, but GCC succeeds, with identical ~/.zshrc configuration?

On my Apple M2 (ARM64-apple-darwin) I have the following C++ code stored in the file hello_world.cpp in some directory called code. I want to be able to compile it using both Clang and GCC, but ...
davidtschan's user avatar
0 votes
0 answers
31 views

How to combine PyVarObject_HEAD_INIT and designated initializers?

In my own "native" Python module I declare a new type this way: PyTypeObject calculatorType = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "My.Calculator", .tp_basicsize ...
Mikhail T.'s user avatar
  • 4,246

15 30 50 per page
1
2 3 4 5
717