How to use Makefile from a very simple example [closed]
I'm trying to learn how Makefile works, so I decided to try it with a very simple code. This is what I wrote:/* justify.c */ #include <stdio.h> #include "line.h" #include "word.h" int main(void)...
View ArticleRunning 'gcc' on C++ source file on Linux gives "cc1plus: out of memory...
I encountered a puzzling problem when compiling a C++ source file using 'gcc' on Ubuntu. Having solved the problem I would like to publish it here to save others the headache of solving it.For the sake...
View ArticleHow can I setup a docker container for developing on the Nordic nRF5 SDK?
I'd like to setup a docker container and share it with my co-workers so we all don't have to setup development environments individually.
View ArticleWhat are the names of different parts of GCC, Apple LLVM, and MSVC compilers?
I'm trying to understand the names of different parts of popular compilers. The compilers I'm comparing are the GNU Compiler Collection, Apple LLVM, and Microsoft Visual C++ (are these the correct...
View Articleglib:unresolvable R_X86_64_NONE relocation against symbol `strncmp@@GLIBC_2.2.5'
I am hitting following issue while linking.Command:-gcc -m64 -shared -fPIC -o libglib-2.0.so.0.5600.1 -Wl,--whole-archive libglib-2.0.a -Wl,--no-whole-archive Error:- BFD:...
View ArticleCompile error, when building tensorflow v1.14.0 without avx2 support
Using Debian 10 Buster, Python v2.7. I try to build specific tensorflow v1.14.0 without avx2 support, because I get following error:Nov 4 17:12:32 moodle37 kernel: [9773297.574293] traps:...
View ArticleCygwin gcc compiling and running, but doesn't printf anything
I'm just starting with C and installed Cygwin with GCC compiler on Windows. I tried running this Hello World program.#include <stdio.h> int main(void) { //fflush(stdout); //setlinebuf(stdout);...
View Articlelinker can't find crti.o and other object files
I'm using this Makefile for a teensy project, and even though I have crti.o, crtbegin.o and crt0.o in /usr/lib/x86_64-linux-gnu and I have that directory in both LIBRARY_PATH and LD_LIBRARY_PATH, I am...
View Articleevent.h: No such file or directory even when libevent-dev is installed
I'm trying to compile a library that depends on libevent. The library is part of a bigger project using cmake build system that has a top-level CMakeLists.txt file.The CMakelists.txt file within the...
View ArticleDisabling the "did you mean..." suggestions in GCC
Newer versions of GCC come with what I consider to be an irritating misfeature: they try to second-guess me, emitting useless "did you mean?" suggestions that drown out other warnings.For example:$ gcc...
View ArticleIs there a way to return either a new object or reference to existing object...
I am trying to write a function, which can either return a reference to an existing object passed as a first argument (if it is in correct state) or create and return a new object using literal passed...
View ArticleTranslate Inline Assembler of Codewarrior to GCC Inline Assembler
I am working on a task to move a big project from old Codewarrior IDE to S32DS from NXP, which use a compiler of GCC 4.9. Unluckily I have big troubles to compile the inline assembley code in S32DS,...
View ArticleTBB cmake compile trouble
I got tbb lib and compile successful. like that g++ test.cpp -ltbbbut using cmake tbb class having undefined reference error..my cmakelist is very simple. cmake_minimum_required (VERSION 2.8)project...
View Articlegcc compiler optimization influences result of floating point comparison
ProblemIn using automated CI tests I found some code, which breaks if optimization of gcc is set to -O2. The code should increment a counter if a double value crosses a threshold in either direction....
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 ArticleHow to install a newer version of gcc separately
I am using CentOS 5.6 which have gcc 4.1.2 installed. I want to additionally install gcc 4.4.6. So, basically I want to install it as a second gcc, and not upgrade the previous one (that is, I want to...
View ArticleGCC won't compile anything on macOS
Recently (since Catalina was released and xcode updated, but I am still running Mojave) I have found the gcc, installed via macports, has broken. I get errors saying that the system includes cannot be...
View ArticleRunning an existing project with CUDA and C++
I am trying to run this project in my laptop. I've the following things installed.CUDA:nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2015 NVIDIA Corporation Built on...
View ArticleHow can I construct objects within constructor and assign the reference?
I have a class called Tree with three instance variables called board (Board), root (Node) and end (Point). Additionally it has a constructor of six parameters. I want to create the objects inside the...
View ArticleImageMagick: OSError: /lib/libc.so.6: version `GLIBC_2.XX' not found
I am working on an embedded linux system and try to get python-wand running...But i am not able to install anything on this system so i included them in the lib folder of my application (this folder...
View Article