All Questions
Tagged with gcc compilation
1,175
questions
1
vote
1
answer
23
views
Understanding GCC Compilation: Preprocessing vs Linking with Libraries
I have a question regarding compilation with GCC.
I have a slight confusion that I believe I've figured out but would like confirmation on. In the first compilation step, preprocessing (cpp) organizes ...
0
votes
3
answers
115
views
When inlining a C function, can an optimizing compiler dereference a pointer more times than explicitly written in the source code?
Consider the following code:
int y = 1;
int* p = &y;
inline int f(int x) {
return x + x;
}
int g(void) {
return f(*p);
}
In this code, there is one explicit dereference.
Is a C compiler ...
1
vote
0
answers
27
views
Unable to import pjsua2 - Undefined symbol: pj_log_5
I'm trying to compile pjsua2 from source, but receive this error when I to import the library in python 3.12 after building it:
Python 3.12.1 (main, Dec 18 2023, 00:00:00) [GCC 13.2.1 20231205 (Red ...
0
votes
1
answer
25
views
Does MinGW-w64 source code need to be cross-compiled in a system that already has GNU utilities?
I have once compiled emacs from source on Debian to make use of novel features that relied on some flags that needed to be used during compilation of the source code. Having also installed Gentoo on a ...
0
votes
0
answers
89
views
How to compile to RISC-V?
I'm writing the final stage for my compiler to riscv; however, I have run into a minor issue of figuring out what the start point of the program is. Are we guaranteed that the PC starts execution with ...
-1
votes
1
answer
38
views
Use MinGW gcc command to link and compile the executable file, but there is no output when executing
I use the third-party library shapelib downloaded by vcpkg to write a program that reads shp files. The file is stored in the following location:
│ main.c
│ main.exe
│ shapefil.h
│
└─shapelib
├─...
2
votes
0
answers
78
views
Why can't I compile C from the Linux command line? [closed]
I run Linux Mint and I am trying to compile a .c file from the command line using the gcc command. However, when I do so, I get an error message that says stdio.h doesnt exist.
I tried gcc filename.c -...
0
votes
1
answer
68
views
C: Linking shared libraries during building vs using libdl at runtime
This website says there are 2 ways of using shared object files (.so):
Dynamically linked at run time. The libraries must be available during compile/link phase. The shared objects are not included ...
0
votes
2
answers
65
views
Flags used during compilation
I am compiling huge C code base, And we are using Make build system to automate the build process. Basically we use lot of flags which are scattered across multiple make files and those compiler flags ...
0
votes
1
answer
281
views
make: cc: No such file or directory
I use ubuntu 24.04 lts. I am trying to compile Makefile of my DEXP ZH-UTC2 usb-ethernet adapter with make command.
That is how Makefile of the driver looks like:
TARGET = ax_usb_nic
KDIR = /lib/...
3
votes
0
answers
53
views
Problem with GCC trying to converto .o file to .exe [closed]
I'm trying to convert a .o file to .exe and this error appears and the code is just a simple hello world code. I'm with MinGW installed and git bash, i tried on it and the same error appears, i'm ...
0
votes
0
answers
29
views
what can i do to resolve the error shown by command make for genomemapper?
I am trying to download GenomeMapper-0.4.4 from http://1001genomes.org/downloads/genomemapper.html in my system-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0.
this is the command i am following as ...
0
votes
0
answers
41
views
Get a "clang: error: no such file or directory" when building my Python package
I'm trying to install a package that I'm maintaining (pygtftk). I'm using the latest version and would like to go on with the development that I let few months ago (to prepare python 3.10 and 3.11 ...
0
votes
2
answers
288
views
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 on centos
[nobin@CentOS9 tc-dump]$ CGO_ENABLED=1 go build
# github.com/Asphaltt/tc-dump
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lresolv
/usr/bin/ld: ...
1
vote
0
answers
34
views
compile gcc on openbsd for libgccjit -- unable to find libc.a
I have cloned gcc repo from (https://github.com/gcc-mirror/gcc/tree/releases/gcc-13). Configured within build directory as such:
../configure --enable-host-shared --enable-languages=jit,c++ --disable-...