Skip to main content

Questions tagged [g++]

g++ is the C++ frontend to the GNU Compiler Collection (GCC). It's the de facto standard compiler for C, C++, Go, Fortran, and Ada on Linux and supports many other languages and platforms as well. Apart from the compiler, GCC has a toolchain (libc, libstdc++, objdump, nm etc.) that is widely used on several platforms and systems.

g++
0 votes
0 answers
56 views

vs code wont run with multiple cpp files [duplicate]

hello i am a beginner and currently following learncpp 2.8 on how to use multiple code files which i was able to build and run manually but build and fail to run in vs code despite setting tasks.json ...
mascarad ninja's user avatar
0 votes
0 answers
50 views

When writing my own lex/yacc, my code that was cpmpiled by g++ producted a weird bug

Could you please help me identify where the issue might be in my code, or is there possibly a problem with the compiler itself?" I was writing my own lex/yacc by cpp. There is some codes for ...
Yiping Hao's user avatar
-1 votes
0 answers
38 views

Undefined reference to `??3@YAXPEAX@Z' [duplicate]

I tried to Link my c++ programm with the Rockey library (Rockey is a company that produces usb hardware keys) but during compilation I get the following error [R4ND_Random]+0x12f): undefined reference ...
Oberwalder Sven's user avatar
0 votes
1 answer
53 views

Valgrind complain after modifing reference return variable from a vector in c++

I am trying to modify an std::vector through the use of references, the vector lifetime is designed in such a way modifications through the reference always are valid, in other words the the reference'...
user1006274's user avatar
-1 votes
1 answer
68 views

clang++ and g++ Compiler gives different output when printing char pointer [duplicate]

clang++ and g++ Compiler gives different output when printing char pointer #include <iostream> int main(int argc, char** argv){ char a = 'a'; char* aptr = &a; std::cout << aptr &...
dtDhruv's user avatar
0 votes
0 answers
32 views

G++ cannot link to instantiated template static method in shared library [duplicate]

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: #include <sym/rot3.h> int main() { sym::...
user17160464's user avatar
0 votes
0 answers
33 views

g++-9 uses newer GLIBCXX symbols when linking against libstdc++

I am facing issues with g++ linking against newer GLIBCXX symbols for std::condition_variable::wait (with g++-9/g++-10/g++-11, libstdc++.so.6.0.30): When using std::condition_variable::wait, GLIBCXX_3....
lfreist's user avatar
-1 votes
1 answer
55 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 ...
Harry Emerson's user avatar
1 vote
0 answers
37 views

How to get g++ to find .so files?

Seemingly as simple as can be: I want to link a shared object file and use a function from it. However, I can't even get this to work in the following simple use case: In the directory /my_proj I have ...
Etay Livne's user avatar
-1 votes
2 answers
53 views

how to compile a c++ file that uses wxWidgets using Mingw(gcc/g++) or using a makefile

i can compile c++ file using visual studio, but i wanna compile it using Mingw(gcc / g++). Note: i don't know much about wxWidgets when i run gcc main.cpp -I C:\wxWidgets-3.2.5\include\msvc -I C:\...
udaan jayanith's user avatar
0 votes
0 answers
44 views

g++ -g debug symbols don't include filename

I've been trying to get lldb working recently and I ran across the issue of breakpoints not being able to find files. So I did a small test, wrote an empty main function and compiled it with MinGW g++ ...
Sam's user avatar
  • 1
0 votes
1 answer
48 views

Unable to build app using vcpkg and Ninja

I am creating a simple test c++ application which is using spdlog for logging. I am using vcpkg as package manager and Ninja as generator and cmake. My package is installed successfully inside my ...
Hamid's user avatar
  • 239
0 votes
1 answer
67 views

Memory error when running multiset.erase(std::prev(multiset.end()));

#include <iostream> #include <set> #include <iterator> using std::cout, std::endl; using std::multiset; int main() { multiset<int> m; m.insert(1); m.insert(2); ...
Couchcap's user avatar
0 votes
0 answers
13 views

std::string issue for system clang++ vs Homebrew g++ on Macos arm64

I'm using a library, compiled with the system clang++ ("Apple clang version 15.0.0; Target: arm64-apple-darwin23.5.0); the library's installed with Homebrew. I then compile a program using that ...
9769953's user avatar
  • 11.5k
-2 votes
1 answer
73 views

Arithmetic error caused by -O3 option on g++ [duplicate]

I have the following (very simple) code: #include <cstdint> #include <iostream> #include <vector> int main(void) { std::vector<int64_t> result; int64_t seed = ...
marom's user avatar
  • 5,190

15 30 50 per page
1
2 3 4 5
712