Why did GCC generate mov %eax,%eax and what does it mean?
GCC 4.4.3 generated the following x86_64 assembly. The part that confuses me is the mov %eax,%eax. Move the register to itself? Why? 23b6c: 31 c9 xor %ecx,%ecx ; the 0 value for shift 23b6e: 80 7f 60...
View ArticleHow to fix "error: no member named 'fancy_abort' in namespace 'std::__1'; did...
platform: Macos Catalina 10.15.2 Xcode version: Xcode 11I have tried many times to make-all gcc to build my source code. However I have encountered a problem:In file included from...
View Article"Agreeing to the Xcode/iOS license requires admin privileges, please re-run...
While attempting to compile my C program, running the following command: gcc pthread.c -o pthread Returns:Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.and...
View ArticleFloating Point Multiply Bug Using gcc 2.7.0 on Amiga with 68881 - Any...
For the heck of it, I decided to see if a program I started writing on an Amiga many years ago and much further developed on other machines would still compile and run on an Amiga (after being...
View Articleld exe in MINGW can not find library
I am trying to build C++ code using MINGW 64 bit 4.8.0 and MSYS2. I am using Windows 7 x64 with Netbeans 8.2 IDE. I am getting below error while building the...
View Articleg++ output: file not recognized: File format not recognized
I am trying to build program with multiple files for the first time. I have never had any problem with compliling program with main.cpp only. With following commands, this is the result:$ g++ -c...
View ArticleUndefined reference to 'inflateInit2_'
I'm using Code Blocks IDE and I want to install Tiled Map Editor for SFML. So, I downloaded the source and imported it to my project. Unfortunately, the build finished with an error due to missing zlib...
View ArticleArithmetic functions written in Inline asm in C program cause Segmentation Fault
Got the following functions for doing multiplication, division and finding a remainder:#define IS_EQUAL(var_, const_) ((INT32)(var_) == (INT32)(const_)) // all these functions must use hexadecimals as...
View ArticleIncompatible implicit declaration and other compile problems in C
I am new to fortran and I have to run some files. I installed MinGW and followed instructions from youtube video https://www.youtube.com/watch?v=xuQL_BZydS0 for Windows 10 I added the enviroment path.I...
View ArticleLinking NASM generated object file (x86_64) with ld : binary file causes...
This question already has an answer here:Nasm segmentation fault on RET in _start 1 answerI have an a.asm file which goes like this: section .text global _start _start: push rbp ; save rbp mov rbp, rsp...
View Articlegcc: error: unrecognized argument in option ‘-mabi=64’
While compiling kernel 3.15.6 on Fedora 20 which is installed on vmware workstation 11, repeatedly got the error[root@localhost linux-3.15.6]# make gcc: error: unrecognized argument in option...
View ArticleAssigning 128 bit integer in C
When I try to assign an 128 bit integer in gcc 4.9.1, I get a warning: integer constant is too large for its type.Example Codeint main(void) { __uint128_t p = 47942806932686753431; return 0; }...
View ArticleGCC 7, -Wimplicit-fallthrough warnings, and portable way to clear them?
We are catching warnings from GCC 7 for implicit fall through in a switch statement. Previously, we cleared them under Clang (that's the reason for the comment seen below):g++ -DNDEBUG -g2 -O3...
View Articlegcc makefile object order
I have a gcc makefile that contains dozens of static objects and one cpp source file. I am getting an error saying undefined reference in one or more of the objects, so I rearrange the static objects...
View ArticleValgrind message : Address XXX is in a r-x mapped file segment
I am learning C for malloc and free heap memory related to self-defined structure.The problem I metFor below code I constantly got segment fault. Using valgrind to analysios showed : ==12999== Address...
View ArticlePython 3.7 psycopg2 - Xcode Error "error: command 'gcc' failed with exit...
For a Python/ Kivy project I'm working on at the moment (using PyCharm), I set up a postgreSQL database. When I try to install the psycopg2 adapter using the terminal $ pip install psycopg2 I am...
View ArticleIs there any way to get import functions from binary files into python scripts?
First of all i created binaries of python scripts using following commands in ubuntu:cython3 --embed -o hello.c hello.py gcc -Os -I /usr/include/python3.5m -o hello hello.c -lpython3.5m -lpthread -lm...
View ArticleCan I tell gcc/g++ on warn on missing header guards?
Whether one uses #ifndefs or #pragma onces, compilers understand guards. And every header file (.h/.hpp) should have a guard. Exceptions perhaps for some .inc files that might be intended to be...
View ArticleCan I generate 64-Bit application binary from a 32-Bit GCC compiler?
I want to understand how a 32-Bit compiler generates 64-Bit binary. I understand that we pass -m64 flag but should we use 64-Bit GCC compiler to generate 64-Bit binary code?
View ArticleWhere to change LD_LIBRARY_PATH
I want to compile these files into executable.//main.c #include <stdio.h> #include <mylib.h> int main(void){ call_hello_world(); return 0; } //mylib.h void call_hello_world(void); //mylib.c...
View Article