Questions tagged [c]
C is a general-purpose programming language
490
questions
0
votes
1
answer
61
views
How to compile and install latest qpdfview pdf reader?
My system environment is Ubuntu 20.04. I downloaded latest source code for qpdfview (0.5 version as of now) from: https://launchpad.net/qpdfview/+download
Installation instruction in README file:
It ...
0
votes
0
answers
266
views
Fatal error: defs.h: No such file or directory When using gcc to compile .c file
Using Openairinterface5g Open source software and am trying to compile one of the .c files using gcc - I keep on getting a very similar 'Fatal error' message which revolves around some sort of header ...
0
votes
0
answers
72
views
Openssl build fails for LIBOQS library
I have tried steps suggested in this thread "https://askubuntu.com/questions/1462945/make-j-failing-for-oqs-openssl" but without luck and i am getting these errors and I am posting last few ...
-2
votes
1
answer
253
views
How do I change the number of columns and rows in the terminal?
I have been developing a graphic library for generating 2d graphics on the terminal. I need to control the number of rows and columns to specify the resolution.
1
vote
1
answer
449
views
How do I install mysql-dev for server?
I am working on a server plugin for MySQL v8.0 (as well as a legacy plugin for v5.7) and I need to install the correct header files. I've looked around the internet and all I can find is ...
0
votes
1
answer
81
views
What languages installed with APT on Ubuntu come with graphical features straight out of the box?
Just wondering what programming languages I can install straight from the APT that come with built in graphics functions on Ubuntu. I know Java can but I don't know of anything else and information on ...
0
votes
0
answers
615
views
skipping incompatible
I want to compile C files using make with the libpng library. However, this is what I got after typing the "make"
make
gcc mp5.o main.o -o mp5 -lpng -g -m32
/usr/bin/ld: skipping ...
0
votes
1
answer
47
views
Custom alias to run and compile .c file [duplicate]
I'm trying to create custom alias to to compile and run my .c files in one command. I tried to add this line in /.bashrc_aliases alias runc='gcc $1 -lm && ./a.out' however I get an error and ...
0
votes
1
answer
109
views
Is the creation of linux shared libraries consistent between linux x86_64 and arm64 architectures?
I'm wondering if the way we create shared libraries is the same between these two architectures.
Let's say I have the file fx.c that contains some function definitions, so I would create a shared ...
0
votes
0
answers
78
views
Utility to detect defect C/C++ compiled/object file
Is there a Linux utility to detect a defect C/C++ compiled/object file interrupted amidst its compilation progress ?
How its simplest usage ?
0
votes
1
answer
2k
views
Ubuntu 23.04 C Compiler cannot create executables - C compiler works no
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by liberasurecode configure -, which was
generated by GNU ...
0
votes
0
answers
827
views
Problem in installing GCC (G++) 5 in ubuntu 22.04
I needed gcc 5 on my ubuntu 22.04. I tried using "sudo apt-get install gcc-5 g++-5" but this output is coming:
sudo apt-get install gcc-5 g++5
Reading package lists... Done
Building ...
1
vote
0
answers
460
views
PTRACE_TRACEME error "Operation not permmited"
I am trying to use PTRACE_TRACEME to trace the child process:
if (ptrace(PTRACE_TRACEME, 0, NULL, NULL) == -1) {
perror("ptrace_traceme");
exit(EXIT_FAILURE);
}
And I got the error:
...
0
votes
0
answers
319
views
gnuplot undefined symbol in c
I have a c program to plot a simple gaussian distribution. However, whenever I call the program I get this error:
gnuplot: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so....
1
vote
1
answer
7k
views
How to fix: "No Space left on device" on /tmp
I'm facing an issue where my program won't compile due to no device space in the /tmp folder.
After a little examine and deleting all files on tmp it stills shows me the same error:
after system ...
0
votes
0
answers
4k
views
fatal error: sys/sysctl.h: No such file or directory compilation error, why this error?
/home/william/Desktop/BlitzMax/mod/brl.mod/platform.mod/glue.c:24:10: fatal error: sys/sysctl.h: No such file or directory
24 | #include <sys/sysctl.h>
| ^~~~~~~~~~~~~~
...
0
votes
1
answer
4k
views
gcc compiler can't find include file stdio.h
The gcc compiler can't find the include file stdio.h.
$ batcat test.c
───────┬──────────────────────────────────────────────────────────
│ File: test.c
───────┼──────────────────────────────────...
1
vote
0
answers
332
views
Imagemagick C and C++ libraries can't be installed at same time on Ubuntu 22.04
apt install libmagickwand-dev graphicsmagick-libmagick-dev-compat
Issue: apt won't install both packages at the same time. apt removes one when I install the other. If I attempt to install both at ...
0
votes
0
answers
155
views
When executing a compiled C/C++ file using seccomp and execve in the below code, it is exiting with status 159 and signal 31
I'm trying to execute C/C++ code in a secure environment using Seccomp and Ececve. But, C/C++ code is not being executed while trying with this setup. Please look at the files.
seccomp_rules.c
#...
1
vote
2
answers
920
views
ncurses installed... but won't compile code
I've recently returned to Xubuntu 22.04 after a brief stint on Fedora.
Under Fedora, I seemed to be able to install ncurses okay.
I could then simply write code and compile with commands like:
$gcc -...
0
votes
1
answer
202
views
Symmetric private key generation using ESAPI API TPM
I was going through the ESAPI APIs , I have hosted the TPM simulator on my Ubuntu 22.04 desktop and trying to generate the symmetric private key from one C program and another C program using the same ...
1
vote
0
answers
128
views
Snap CLion IDE exits on run
I installed snap package of CLion IDE, when I launch it from ULauncher it exits upon clicking run, however when I run it from the terminal it seems to work just fine, what could be the cause of this?
...
-2
votes
1
answer
15k
views
Directory path to open a file in c program
I am trying to append data to a text file (info.txt) at the home directory using C programming language. I am supposed to use the function fopen() that has the following syntax fopen("file path&...
0
votes
1
answer
854
views
Why this orphaned process is called by a child process of init instead of init?
I know that all orphaned process are taken over by the init process(mother process) but I wrote a c program to understand how processes really work and I notice that a orphaned process is taken over ...
6
votes
3
answers
22k
views
How to install clang-14 on Ubuntu 18.04?
Can you help me install clang-14 on Ubuntu 18.04? I think I need a valid repo as apt-get install clang-14 does not work.
$ cat /etc/issue
Ubuntu 18.04 LTS \n \l
$ sudo apt-get update
Hit:1 http://...
1
vote
1
answer
309
views
Output not showing in my ubuntu while compiling c
While compiling my C code in sublime-text in my Ubuntu The output is not shown.enter image description here
0
votes
0
answers
52
views
Error in STM Code after compliling on Ubuntu
I'm following this tutorial for setting up the STm32MP157C-DK2 microcontroller. On the steps for creating a basic hello world program, I am able to compile a program and upload it to the STM through ...
5
votes
3
answers
4k
views
How to print the ■ character in linux terminal using C?
This char is 254 in ASCII Extended Table, and 25A0 in Unicode. If I run putchar(254) the terminal does not recognize the char, as I think it utilizes not extended ASCII.
0
votes
1
answer
332
views
sudo command make child process to zombies
I'm trying to make a program that divides into child and parent processes with fork(). Child executes arguments with execv() and parent traces him with ptrace(). I made almost all parts of the program,...
0
votes
1
answer
689
views
libc.6 is a symlink to libc-2-31?
I'm running ubuntu 20.04, and I'm tryying to run a python pwn script that has the following line:
libc = ELF("./libc.so.6")
Which fails with:
No such file or directory: './libc.so.6'
So I ...
2
votes
1
answer
237
views
How to add a custom context menu action to a certain mime type Ubuntu 21.10
I am making a installer for my program and I need to add a custom context menu action **only **to a certain mime type.
1
vote
1
answer
973
views
Download Linux native x86_64 GCC toolchain?
I'd like do download the GNU GCC package toolchain for Ubuntu, and not install it (sudo apt install build-essential) - just download. There are toolchains for cross-building for Arm targets, but I ...
0
votes
0
answers
309
views
downloading graphics.h
I'm trying to download graphics.h, but when I get to the part where I have to extract the libgraph-1.0.2.tar.gz file, I can't find that file anywhere on my directory. I am trying to download graphics....
0
votes
0
answers
102
views
getting error Error: module pwquality: child process exited with code 1 while building gnome-control-center repository
I m new in GTK development with the meson build system and have built a gnome-control-center repository that is using meson build system and built-in c on my system's virtual machine but on a VPS it's ...
1
vote
0
answers
115
views
Ubuntu can't turn off Legion back logo light
Is there a way to turn on/off the Legion Slim 7 Logo light on Ubuntu OS? It works by pressing Fn+l on windows; doesn't work on ubuntu.
The keyboard light works perfectly fine.It is just the logo light....
2
votes
0
answers
137
views
Unable to get Gnu C Library debug symbols
I have two machines. One is Intel x86_64, the other is aarch64 (although I doubt the architecture variation is the problem). Both are Ubuntu. I compile the same program on each of the machines, with ...
0
votes
1
answer
3k
views
syntax error near unexpected token '(' when initializing main [closed]
So I keep getting an error: syntax error near unexpected token '(' and it's referring to the line 'int main(){' in my code. I don't know why I'm getting this error, can someone please help?
1
vote
2
answers
1k
views
How to use KDevelop with github?
Previously I used VSCodium for my C and C++ programming needs. But I a beginning to like KDevelop more. There is actually 2 things that I'm unable to setup properly on KDevelop: Github integration and ...
-1
votes
1
answer
10k
views
Another no such file or directory? But the file exists!
i am facing a problem that consumed a lot of my tine. i am trying to link my object file (small program compiled with nasm) with ld linker and using c functions. I searched a lot and i found that the ...
-1
votes
1
answer
554
views
How to write a C api program to make calls using linphone sdk [closed]
I am very new for the C programming, I want to create a C program to make calls using linphone-sdk. i don't know how to start writing a C program.
-5
votes
1
answer
71
views
Coding on VS code [closed]
Hello this is my first time to learn C by a book
But The code doesn't give output
I installed build essential
What should I do ?
int main()
{
printf("Hello World!");
}
0
votes
0
answers
108
views
Sending ICMP Echo Request Using Raw-sockets
I compiled a c program that sends ICMP Echo Request Using Raw-sockets and also receives one back (ping).
However, for some reason, even though I am the ROOT I still seem to be denied by the permission....
0
votes
2
answers
166
views
Embedded studio
I used to program embedded microcontrollers with keil uvision software on windows but recently I switched to ubuntu operating system and still don't know how to program microcontrollers (cortex -m3 ...
-1
votes
2
answers
509
views
"Helloworld" c program failed on my new ubuntu 20.04
when i build hello world program on eclips they are showing this
when i build helloworld program on c on eclips this is shown on console:-
10:21:36 **** Build of configuration Debug for project sample ...
0
votes
2
answers
613
views
How to create a .desktop to a C program? [closed]
So I'm trying to execute a C terminal program just by double clicking it. I'm trying to do that through a .desktop file
The desktop file has permission to execute as a file and it's in my desktop.
...
1
vote
0
answers
243
views
GCC compiling problem
I just downloaded the GCC compile for C/C++. After compiling with the command gcc main.c -c -lGL -lGLU -lglut I get a permission error which can be fixed by changing the permissions. I then get this ...
0
votes
0
answers
390
views
Watchman: C compiler cannot create executables
I try to install Watchman for React Native.
At the configure I get the following error:
configure: error: in '/home/maxim/watchman':
configure: error: C compiler cannot create executables
See 'config....
1
vote
1
answer
3k
views
Netbeans 12.4 C/C++
I need to build C/C++ projects on Netbeans 12.4 with Ubuntu 18.04. There have been a long list of failures - trying earlier versions of Netbeans and even Eclipse. I can't find a simple tutorial / ...
0
votes
0
answers
101
views
How to detect that a C/C++ file is using windows specific stuff
Basically I want to test files/libraries/code in general that wont run on Linux by detecting windows specific includes, program calls, dynamically linked libraries at runtime, anything that isn't ...
0
votes
1
answer
522
views
GCC compiler does not recognize in the CodeBlocks IDE (Set variable: LD_LIBRARY_PATH=.:)
I am using Ubuntu 20.04 LTS and I have been trying to get up and run the C programs in codeblocks IDE and it keeps getting me this following error.
Checking for existence: /media/darkpheonix/dptech/...