I compiled a static library. I have two files. mylib_1.c with function foo1 in it mylib_2.c with function foo2 in it. Both #include "mylib.h". I compiled a libr
I try cross compile zlib for arm-poky-linux-gnueabi but I've an error when I launch make : ...:~/zlib-1.2.11$ AR=$HOST-ar CC=$HOST-gcc RANLIB=$HOST-ranlib ./co
I try cross compile zlib for arm-poky-linux-gnueabi but I've an error when I launch make : ...:~/zlib-1.2.11$ AR=$HOST-ar CC=$HOST-gcc RANLIB=$HOST-ranlib ./co
void f1(int* count, char* str) { for (int i = 0; i < *count; ++i) str[i] = 0; } void f2(int* count, char8_t* str) { for (int i = 0; i < *count; ++i)
To test for a feature, cppreference mentions these feature test macros: link. If the feature is present in the compiler, the macro is defined. But I don't unde
I am trying to use a grsecurity gcc plugin that I found on their unofficial linux kernel source tree (the respectre_plugin/ one). My GCC version is 4.7, I modif
When trying to compile OpenACC code with GCC-9.3.0 (g++) configured with --enable-languages=c,c++,lto --disable-multilib the following code does not use multipl
In C or C++, if the compiler encounters a for loop in which a counter is counting from 0 to n, and n is a variable (not a function call, and NOT A CONSTANT eith
On Ubuntu 22.04 LTS, I'm cross-compiling for raspberry pi. When I run any built executable on the pi, I get this linking error: /lib/arm-linux-gnueabihf/libc.so
I have the following C++ code in a file called helloworld.cpp: #include<iostream> int main() { std::cout << "Hello, World!\n"; } I would like
I noticed that all the mathematical constants are declared as double, which leads to conversion problems on some platforms where no double precision units exist
I need someone to outline how to pass command line arguments to CLion. What I've found so far hasn't worked for me. Specifically I need to know how to pass mult
In x86-64 target Debian, most of the programs are link against shared objects with the /lib64/ld-linux-x86-64.so.2. And there is also one in /lib/x86_64-linux-g
I am trying to define a union struct with some struct and primitive members overlapping in memory with a simple array. This works perfectly in Clang and MSVC, b
I'm trying to compile this simple GMP program on Cygwin: #include <gmp.h> int main(){ mpz_t i; mpz_init(i); } This is the command: gcc -lgmp t
So, I just installed Eclipse for C/C++ and whenever I make a new project, I get two errors saying that the programs g++ and gcc are not in my PATH. All of the a
I am having immense difficulty trying to use std::string. The program compiles absolutely fine, but when I run the program, I receive this error: error I have
I am running my program on linux server and it was compiling and running fine then i made another directory and tried to compile it in that directory and it w
I'm new in C and have some problems compiling my code in OS X. I code Java a lot both in Eclipse and use terminal to compile my code. However now I'm learning
The gcc (or g++) compiler has a -std option to specify the language standard to use for compiling C or C++. At the top level one can see that this option exists