All Questions
2,100
questions
-1
votes
0
answers
17
views
Im new to C++ idk how to run the code and im getting some errors
I am new to C++ because I've been using python and I just learned how to install packages with vcpkg and I installed dpp/dpp.h but when I put it in a file it says it recognizes the package but as ...
0
votes
0
answers
35
views
How to build and Install compiler g++-4.8.5 on ubuntu 24.04 from source code?
I am getting error while building gcc-4.8.5 on ubuntu 24.04
I had followed the below steps as mentioned in the page How to Install compiler g++-4.8.5 in ubuntu 20.04
sudo dpkg --add-architecture i386
...
-1
votes
1
answer
59
views
How to include opencv headers without using cmake?
I installed the opencv library by using apt:
sudo apt install libopencv-dev libopencv-contrib-dev
But how to involve the installed library into my own project without using cmake? I tried directly ...
0
votes
0
answers
23
views
Passing a definition on the gcc command line results in "not declared in this scope" [duplicate]
I'm writing a c++ program and trying to pass a string value from the makefile to the code using the -DMACRO=VALUE format but it results in a compiler error that I don't quite understand.
Here is the ...
0
votes
0
answers
60
views
What arguments are missing in this g++ call?
I must use g++ to compile a program that I did not write. The repo provides an installation script that includes compilation. But I think there's a mistake in the script, as I get two "missing ...
0
votes
1
answer
30
views
Issue with building Unikey on Ubuntu 22.04
I'm trying to install Unikey (a program for typing Vietnamese) on Ubuntu 22.04 by following the instructions on the Unikey Linux page. While running ./configure was successful, I encountered an error ...
0
votes
0
answers
15
views
error with config gcc for setting up atheross csi tool openwrt
I am currently trying to setup openwrt on ubuntu virtual box but there is an error with config the file the gcc, verison is the latest and its installed, when i run make menuconfig command this is the ...
0
votes
0
answers
17
views
How to set the pro file in order to debug a Qt programs in release mode using g++ compiler?
I am using Qt Creator on Ubuntu, and compiling my Qt program using g++.
How do I set up my .pro file in order to debug my program in release mode?
I tried to add these lines:
QMAKE_CXXFLAGS_RELEASE = -...
0
votes
0
answers
45
views
Need for parenthesis operator as indirection before subscript holding pointer within [duplicate]
The following C++ code on g++ compiler compiles and also gives 2 as output when ran.
#include <iostream>
int main()
{
int a[4] = {1, 2, 3, 4};
std::cout << (1)[a] << '\n'; //...
-3
votes
1
answer
79
views
I get this error regarding the constructor when I try to compile with g++ and I'm using macOS :no matching constructor for initialization of [closed]
I have a perfectly normal code (a cpp and a cpp file) and a makefile and but when I try to compile it with g++ I get this :
g++ -std=c++11 -c subject.cpp -o subject.o
In file included from subject.cpp:...
6
votes
1
answer
186
views
Does this use of optional<string> reveal a bug in gcc?
I've reduced my code to the following example, which fails -O3 C++20 compilation on my g++ (x64 12.3) as well as apparently 14.1 when using godbolt:
Again according to godbolt, clang works without any ...
0
votes
1
answer
27
views
GCC/G++ Linking issue. Bit of a noob question [duplicate]
I have a project that was build with cmake. The project creates a library (.a) in one directory, and then the application (from another directory) links in this library. It's using GCC as the ...
1
vote
1
answer
54
views
Compiling FMOD with G++ on an x64 architecture
I've been struggling to compile my program using FMOD on VS Code. I'm quite new to compiling using something else than Visual Studio's default compiler, so linking with other file formats has been a ...
0
votes
1
answer
499
views
std::println/print not working in Winlibs MinGW (gcc 14.1)
I was testing out the new <print> library in GCC 14.1 and tried to compile a program with std::println() only to be greeted with this (I've removed my name from the Users directory for privacy):
...
0
votes
0
answers
51
views
How can I force g++ 5.4.0 to only use system headers that do not require C++11 support?
I am compiling C and C++ code for several platforms using Docker images provided by a different team. The other team provides different Docker images for each platform, and there is no uniformity as ...