multiple definition linker error while compiling project with 'mksquashfs'
I'm encountering a 'multiple definition' error while trying to compile a project that includes "mksquashfs". The error I'm getting are like this:/usr/bin/ld: read_fs.o:(.bss+0x0): multiple definition...
View ArticleCan't install cargo-binutils library: Failed to find tool. Is `gcc.exe`...
When I run cargo install cargo-binutils, I get the below error. I have gcc installed and in my path, to the point where where gcc correctly returns the location. gcc version: gcc.exe...
View Articleld.exe: DWARF error: could not find variable specification at offset 101cee
I get massive output with the following message (differentiated only by hex address):ld.exe: DWARF error: could not find variable specification at offset 101ceeWhat is the meaning of this error in...
View Articleinvalid output constraint in asm
I am trying to make an operating system in C. I get these errors when i compile the scripts:gcc -m32 -nostdlib -nodefaultlibs -Wall -Wextra -ffreestanding -O2 -Iinclude -c src/io.c -o...
View Articlepragma ignored in g++ and clang
I would like to disable specific known warnings in C++ code coming from a library header when compiling my own code. There are clang and gcc specific methods for disabling the warnings. The way this is...
View ArticleEmbedding resources in executable using GCC
I'm looking for a way to easily embed any external binary data in a C/C++ application compiled by GCC.A good example of what I'd like to do is handling shader code - I can just keep it in source files...
View ArticleWindows 10 error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
I am struggling to fix error: linking with 'x86_64-w64-mingw32-gcc; failed: exit code: 1, I have installed TDM-GCC-64 and Cygwin and added them to PATH as well as updating the c++ 2019 redistributable....
View ArticleCompiler or Clang tidy warning on methods that directly access the file system
my C++ code has calls to classes such as std::ifstream to open a file for reading or std::filesystem methods that iterate over directories or check if a file exists - I intend to abstract these away in...
View ArticleMakefile won't build, fatal error cannot specify with multiple files
I'm not that related in the C/C++ programming there's a library I wanted to try out needed to be compile using CMake so I built it with MinGW Makefiles generator with the last Boost library it...
View ArticleHow do I compile the asm generated by GCC?
I'm playing around with some asm code, and something is bothering me.I compile this:#include <stdio.h>int main(int argc, char** argv){ printf("Hello World\n"); return 0;}with gcc file.c -S -o...
View ArticleIn C struct, why packed,aligned seems to do padding?
In C struct, why packed,aligned seems to do padding?I have to read a bunch of MSB/LSB bytes from a remote device using i2c. As all device data are bytes, I use uint8_t which represent exactly 8 bits...
View Articlecannot find -lboost_program_options
I got some error when I compile flann in windows. I install the boost and gcc 4.3.3. Where is this error come from and how can I solve that?g++ src/*.o -o cbir -lboost_program_options -lhdf5...
View ArticleCan't get a Qt Hello World to work
I've compiled Qt on OSX Lion using the instructions provided at this official guide. I've then tried compiling the following Hello World with gcc hello_world.cpp -o hello_world#include...
View ArticleIs it possible to build sqlite extensions on Apple Silicon using clang?
I am attempting to build the percentile sqlite extension on an M1 laptop using the instructions on the page:gcc -g -fPIC -shared percentile.c -o percentile.soHowever, that results in the following...
View ArticleHow can I cross-compile TVM for RISC-V on x86 Ubuntu 22.04.2 using LLVM and...
How to cross compile TVM to RISCV on x86 Ubuntu 22.04.2?I want to cross-compile TVM for RISC-V on x86 Ubuntu 22.04.2.Environment:TVM version: 0.13.0-dev0LLVM : sudo apt install llvm, version: 14.0.0GNU...
View ArticleWhy do I get cc1plus: error: unrecognized command line option "-arch"?
/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf/usr/bin/make -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/cppapplication_1mkdir -p build/Debug/GNU-MacOSXrm -f...
View ArticleIs 0u defaulting to a signed int?
The following code triggers a signed unsigned comparison warning:uint16 x = 5;if(((x) & (uint16)0x0001u) > 0u) {...}Replacing the if with this eliminates the warning:if(((x) &...
View ArticleHow to fix linker error "cannot find crt1.o"?
I have a virtual Debian system which I use to develop. Today I wanted to try llvm/clang. After installing clang I can't compile my old c-projects (with gcc).This is the error:/usr/bin/ld: cannot find...
View Articleg++-13 the "-isystem" flag seems to work incorrectly with optimization enabled
File "include/header.hpp"#include <iostream>class Eka{ int x;public: Eka() { std::cout << x;}; Eka(int y) : x(y) {} int Sqr() const { if(x > 5) return x + 1;};};file "eka.cpp"#include...
View ArticleCompiling a c program on linux ubuntu
Hey guys please help me out here. I have made a c program. I'm new to it and compiling it and i'm getting an error thats making me pull my hair out. error as: unrecognized option "--32"I've tried using...
View Article