Why Does the .bss Section Output Show a Large Value Compared to the Memory...
I'm compiling someone else's code using GCC and the output from GCC shows a large .bss section:text data bss dec9468 1080 10892 21440I run the following command to generate information related to each...
View ArticleGDB-Run Executable Doesn't Work (VS Code)
I am using VS Code for a C++ Project. I am also using CMake Tools to manage the CMake side of things and my compiler toolchains.I have two separate compiler kits - i686-w64-mingw32 and...
View ArticleGDB Unknown Target Exception (when debugging 32-bit target with 64-bit...
I want to use the GDB debugger provided with the 64-bit version of MinGW-w64 (x86_64-w64-mingw32) to debug 32-bit targets created using the 32-bit version of MinGW-w64 (x86_64-w64-mingw32). According...
View ArticleWhy does clang handle exceptions for this trivial std::variant code?
If we have code like this:#include <variant>int main(){ using V = std::variant<int, double>; V a = 5; V b = 5.6; a.swap(b);}https://gcc.godbolt.org/z/oqGiHsIf you compile with clang, it...
View Articlearm-linux-gcc:undefined reference to error
I would like to compile the cortex-r4's bootloader on linux with arm-linux-gnueabihf-gcc,the makefile gives me an undefined reference error:autoinit.h:143: undefined reference to...
View ArticleMake g++ create the -o file same as program name
I want to write an alias or new command that will call g++ and create an executable with the same name as the cpp fileeg g++ hello.cpp creates ./hello instead of ./aI use g++ hello.cpp -o helloIs there...
View ArticleWeird error when compiling 32-bit programs with GCC
When I try to compile a simple 32-bit C program using GCC on 64-bit Linux, I get the following message:[teo.samarzija@teos-acer-laptop debug]$ gcc -m32 -o program...
View Article_muldi3_s.o is in unrecognized file format when compiling GCC
I am trying to compile GCC from source on 64-bit Oracle Linux 7, and I get the following error:/usr/bin/ld: _muldi3_s.o: unable to initialize decompress status for section .debug_info/usr/bin/ld:...
View ArticleFor a static library with class templates, how can I hide implementation...
Looking through the list of suggested "Similar questions", it seemed those would rather like header-only stuff, and one question which does want to separate but has different problems.I have a folder...
View Articlegcc compiles ELF file with wrong search list
After compiling gcc and using it to compile a simple c program:echo 'int main(){}'> dummy.ccc dummy.c -v -Wl,--verbose &> dummy.loggrep -B4 '^ /usr/include' dummy.logthe result is:ignoring...
View ArticleSame gcc compiler version giving different compilation results related to std...
We have 3 linux CI machines with exact OS, cmake and compiler environments. OS is ubuntu 18.04 LTS, cmake 3.10.2 and GCC 7.5There is a C++ code base with several .hpp files missing std:: namespace...
View ArticleGCC compilation error while building tensorflow using docker on mac(host)...
System informationOS Platform: host: mac 14.10 docker image: tensorflow/tensorflow:latest-devel TensorFlow version: 2.2Python version: 3.6.9building tensorflow from source using docker on mac with...
View Articlewhat does [undefined reference to `SetLastError@4'] mean?
I use mingw-w64 to deploy C++ on windows, everything is normal except when I use the library function, the following problems will be reported at...
View ArticleWhy the second printf statement overlaps the first one on linux console
The first printf statement prints find but the second one overlaps it. Whats the issue here and how can I fix it?void student(char *name, char *id){ char nme[50]; strcpy(nme,name); //printf("%s",nme);...
View ArticleIs .NET a requirement for Windows programming? Fast Windows execution [closed]
Just curious if .NET is absolutely required to write software to run in a Windows 10 Operating System environment? I'm talking about compiled code, such as C/C++/C# (not writing in a scripting language...
View ArticleAVR-GCC Windows vs. Linux
I'm working on an Arduino project which was being developed on a Windows machine with the Arduino Builder. After having a release candidate, I started developing a Linux docker container that would...
View ArticleGetting coverage info for if branches in GIMPLE code
I am doing some instrumentation with my GIMPLE code, and after now I want to collect the coverage information of my instrumented GIMPLE code (not the original c code).Suppose i have the following...
View Articlesetup script exited with error: command 'x86_64-linux-gnu-gcc' failed with...
When I try to install odoo-server, I got the following error: error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1Could anyone help me to solve this issue?
View ArticleString print out differently in Visual Studio and gcc
I have created a simple project using Visual Studio 2012, and the code was compiled successfully, ran, and printed out as I expected (The fruit name is: apple). When I try to compile the same code with...
View ArticleHow do I link libraries in Eclipse?
I'm working on a project and it all worked previously in Code::Blocks. A team member is using Eclipse, though, and he has the code from our entire team. He's been working on compiling all of our code...
View Article