Skip to main content
2325 votes
12 answers
239k views

I am doing some numerical optimization on a scientific application. One thing I noticed is that GCC will optimize the call pow(a,2) by compiling it into a*a, but the call pow(a,6) is not optimized and ...
xis's user avatar
  • 24.9k
1939 votes
37 answers
2.0m views

I am trying to build a shared library using a C extension file but first I have to generate the output file using the command below: gcc -Wall utilsmodule.c -o Utilc After executing the command, I ...
Mohanad Y.'s user avatar
  • 19.7k
1639 votes
24 answers
711k views

We are compiling an embedded C++ application that is deployed in a shielded device in an environment bombarded with ionizing radiation. We are using GCC and cross-compiling for ARM. When deployed, our ...
rook's user avatar
  • 67.1k
1212 votes
11 answers
706k views

What is the difference between g++ and gcc? Which one of them should be used for general c++ development?
Brian R. Bondy's user avatar
1112 votes
5 answers
138k views

Why does the C preprocessor in GCC interpret the word linux (small letters) as the constant 1? test.c: #include <stdio.h> int main(void) { int linux = 5; return 0; } Result of $ ...
ahmedaly50's user avatar
  • 7,855
805 votes
2 answers
101k views

Here is the extract from the program in question. The matrix img[][] has the size SIZE×SIZE, and is initialized at: img[j][i] = 2 * j + i Then, you make a matrix res[][], and each field in here is ...
user avatar
705 votes
31 answers
533k views

I am working on Linux with the GCC compiler. When my C++ program crashes I would like it to automatically generate a stacktrace. My program is being run by many different users and it also runs on ...
KPexEA's user avatar
  • 16.8k
637 votes
11 answers
633k views

How do I list the symbols being exported from a .so file? If possible, I'd also like to know their source (e.g. if they are pulled in from a static library). I'm using gcc 4.0.2, if that makes a ...
Moe's user avatar
  • 30k
615 votes
11 answers
277k views

Why does the order in which libraries are linked sometimes cause errors in GCC?
Landon's user avatar
  • 15.8k
605 votes
14 answers
2.9m views

How do I convert a char to an int in C and C++?
mainajaved's user avatar
  • 8,189
603 votes
6 answers
856k views

In a GCC compiled project, How do I run CMake for each build configuration type (debug/release)? How do I specify debug and release C/C++ flags using CMake? How do I express that the main executable ...
Cartesius00's user avatar
  • 24.6k
603 votes
5 answers
426k views

I have read about GCC's Options for Code Generation Conventions, but could not understand what "Generate position-independent code (PIC)" does. Please give an example to explain me what does it mean.
Narek's user avatar
  • 40.2k
586 votes
21 answers
952k views

When building my C++ program, I'm getting the error message undefined reference to 'vtable... What is the cause of this problem? How do I fix it? It so happens that I'm getting the error for the ...
RyanG's user avatar
  • 7,343
574 votes
7 answers
156k views

I keep hearing about LLVM all the time. It's in Perl, then it's in Haskell, then someone uses it in some other language? What is it? What exactly distinguishes it from GCC (perspectives = safety etc.)...
bodacydo's user avatar
  • 80.4k
546 votes
17 answers
569k views

How does one do this? If I want to analyze how something is getting compiled, how would I get the emitted assembly code?
Doug T.'s user avatar
  • 65.9k

15 30 50 per page
1
2 3 4 5
2819