Questions tagged [g++]
G++ is the C++ front-end of the Gnu Compiler Collection (GCC)
325 questions
0
votes
0
answers
40
views
G++ command not found after reinstalling on ubuntu
I'm running Ubuntu,and I'm getting a "bash G++ command not found" error,even though I just installed it with 'sudo apt install buil-essential'. I've tried refreshing the package list, but it'...
2
votes
1
answer
105
views
The C compiler identification is unknown
I have been trying every single solution the WWW has to offer, I would appreciate if someone could please help.
Dockerfile
# https://pythonspeed.com/articles/base-image-python-docker-images/
# https:/...
1
vote
0
answers
426
views
g++-15 bug on Ubuntu 25.05
I've installed g++-15 using sudo apt install g++-15. I'm trying to compile a simple program which utilizes a c++-23 feature:
// test.cpp
#include <format>
#include <vector>
int main() {
...
0
votes
1
answer
329
views
enable_language(CUDA) fails missing g++ dependencies. But they are all there
I installed Cuda 12.9 for my Ubuntu Jellyfish (22/04), following this manual:
https://developer.nvidia.com/cuda-12-9-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&...
0
votes
0
answers
409
views
VS Code in WSL Fails to Find Standard C++ Headers (#include errors) Despite g++ Installation
I am developing C++ code using Visual Studio Code connected to Ubuntu running under WSL 2 on Windows 11.
wsl --version
WSL: 2.4.13.0
Although I have installed the necessary build tools in WSL.
sudo ...
1
vote
1
answer
1k
views
How to install gcc-14 and g++-14 on Ubuntu 22.04?
I am trying to install gcc-14 and g++-14 on Ubuntu 22.04.
I thought these compilers should be available via the ppa ppa:ubuntu-toolchain-r/test, which I added using the following command.
add-apt-...
-3
votes
1
answer
113
views
understanding c++ --help section
My understanding is that whoever wrote a program wrote the help section explaining what each argument you can pass to it does, if I type g++ --help I get a write up showing lots of options "in my ...
1
vote
1
answer
4k
views
How to install `g++12` on Ubuntu 20.04.6?
How can I install g++12 on Ubuntu 20.04.6?
I tried a few ways on google but none seems to work.
0
votes
0
answers
392
views
unable to compile anything after installing cpr library #
sudo g++ -o /usr/local/bin/t1 '/home/ubuntu/Desktop/test1.cpp'
I am encountering an error while attempting to compile any cpp file, regardless of which one it is. The error message reads:
"as: ...
2
votes
0
answers
682
views
Is there any way to ensure that few symbols of static library get definitely loaded into .so file?
We have a huge amount of cpp files and taking a piece of code where we need some clarification regarding that. As we have cpp files we compile those into multiple static libraries and those result ...
1
vote
1
answer
7k
views
g++ -- Undefined Reference to main in 86_64-linux-gnu/Scrt1.o:
I am trying to compile a simple C++ Hello World program to test my environment, however, whenever I try, I get this Error:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1....
0
votes
1
answer
2k
views
How to make g++ use the C++20 language standard when compiling from code-blocks in Ubuntu 22.04
Just started learning c++ and it is recommended to compile code using the c++20 standard and use code::blocks as the editor.
I checked the man pages of g++ and it is using c++17. I am using code::...
-1
votes
1
answer
71
views
Why does c++ app launched from the Netbeans use Netbeans install dir?
When I run a simple application that uses a library, Ogre3D in my case, from NetBeans, it breaks with the following message:
Error occurred during execution: InternalErrorException:
Could not load ...
0
votes
0
answers
354
views
Binary files not being generated
When I try to compile a c, c++, or fortran code no binaries are generated and no errors are thrown by the compilers neither. This seems to be independent of the compiler. For example, below I try to ...
0
votes
1
answer
1k
views
"make" command not working
I'm currently trying to install graphics.h to do C programming, but I've been having a problem that I've been unable to solve so far.
Every tutorial explaining the process is the exact same, and they ...