All Questions
14 questions
0
votes
1
answer
239
views
Unable to use GTK on Debian, due to having libraries always be missing
Due to my laziness, I have downloaded precompiled binaries for GTK programmes (rather than compiling them which would have been a drag considering how time-wasting it is). EDIT:using sudo apt get, ...
39
votes
3
answers
15k
views
Do C compilers discard unused functions when statically linking to .a file?
Say I have a C program main.c that statically links to libmine.a. Statically linking to a library causes library functions to be embedded into the main executable at compile time.
If libmine.a were to ...
0
votes
1
answer
3k
views
How to set compiler specific standard headers #include paths?
What is a smart way to tell two compilers to look for their #include headers?
Running on a standard Linux 86x64 system, my standard compiler is gcc (currently v9.3).
Now I'd like to compile some ...
3
votes
1
answer
2k
views
Recover static library from executable
I have an existing executable for which a small amount of source code has been lost. In particular, the executable uses a few functions from a static library, and the source code for that library is ...
9
votes
2
answers
8k
views
Want to turn off "note" level messages in GCC
When I compile a C (no pluses) program using GCC, there are several levels of messages possible, like warning, error, and note. The note messages are useless and distracting. How do I make them go ...
0
votes
0
answers
34
views
How does my application in Linux know how to find libraries in the common places [duplicate]
When I compile a simple C program for Linux, how does it automatically know where to find the standard C libraries when I run it?
Take the simple Hello World program for example which uses printf to ...
3
votes
1
answer
2k
views
Why is LDBL_MAX 1.18973E+4932 and how is this possible?
If I write a C program to say the value of LDBL_MAX the largest value for a long double,
#include <float.h>
#include <stdio.h>
int main(void) {
const long double max = LDBL_MAX;
...
-1
votes
1
answer
2k
views
C compiler while installing GCC!
I have a virtual machine running RHEL7. I am trying to install GCC from source following
https://gcc.gnu.org/wiki/InstallingGCC
I am unable to do
yum groupinstall "Development Tools"
or
yum ...
3
votes
1
answer
3k
views
Compiler for 32-bit LSB MIPS MIPS32 architecture
I have a TV set top box that i'm currently experimenting on:
I established a serial console connection to it through a serial port located on the board. I am trying to compile a simple C executable to ...
5
votes
1
answer
3k
views
Can I write C programs for Linux on OS X?
In case I'm writing a program (of any kind) in C, that is meant to be run on Linux environment, can I write it under OS X? (concurrency wise for example)
I'm asking this because I like programming in ...
0
votes
1
answer
262
views
-fPIC Flag System-wide?
Position Independent Code means that the generated machine code is not dependent on being located at a specific address in order to work. and the jumps are relative.
So is it OK to declare -fPIC ...
2
votes
2
answers
780
views
Is there a good FOSS utility for converting machine code to assembly or even C?
If I buy a piece of x86 32-bit or 64-bit software but I don't receive the source code, and I need to modify the software, I'll need to convert the machine code back into a high level language or at ...
12
votes
2
answers
9k
views
Why can't I run this C program?
I'm trying to run my first "process" program, but I get the following error :
./fork.c: line 4: syntax error near unexpected token `('
./fork.c: line 4: `int main()'
I'm pretty sure that the code is ...
10
votes
2
answers
15k
views
How can I get a static C compiler?
I'm playing around with chroot environments, and I'd like to have a portable C compiler so that I can easily set up some basic build-tools in each environment without having to move too many libraries ...