Installing c++ standard library files on ubuntu
To give a background, there was a tuple file in /usr/include/c++ which got corrupted. So my compiler used to give input/output error. I downloaded tuple file from web from c++ library and replaced it with my corrupted file. But now error was different. My professor asked me to reinstall my library. So for that i removed /usr/include/c++ folder that had all library files. Now when i reinstalled g++ i thought it would automatically get the header files i.e /usr/include/c++ folder but i was wrong. It does not get installed. I have tried to find solution and people saying install -dev version etc but i could not find the commands to install those header files. Kindly help.
G++ cannot link to instantiated template static method in shared library
I have a simple code that’s trying to link to a static method of a class template that’s already instantiated in a shared library. This is the code:
Running my first code in c++ and getting this error regarding some file in g++ folder
so I installed visual code and setup g++ compiler etc.
now while running my code I’m getting this error
I’m getting an ‘unidentified reference’ error in C++ that I can’t seem to find the solution to. Please help. I’m not using any virtual functions
When running my code, I keep getting the following errors:
Expected ‘)’ before ‘*’ in constructor even though there’s no reason a ‘)’ should be there in c++
I’m writing a small game engine project and I’m having trouble with this constructor. For some weird reason g++ says I need to add a ‘)’ in a spot where there’s no reason to add one. Neither I nor Visual Studio Code see anything wrong with it and I’ve been looking at this for 20 minutes trying to see if something is wrong. The error is occurring in the PhysicsObject and Renderable constructors.
Why can’t I use the subscript operator on the result of std::ranges::to()?
Why can’t I use the subscript operator on the result of std::ranges::tostd::vector() or even better without and what is the solution?
BTW, I am trying this with G++ trunk.
Executable size increasing dramatically
If I compile the following with g++ -g a.cpp
, I get an executable of size 100,100 bytes. OK.
executable size increase dramatically
If I compile the following with g++ -g a.cpp
I get an executable of size 100,100 bytes. Ok.