Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [c]

C is a general-purpose programming language

Filter by
Sorted by
Tagged with
0 votes
1 answer
18 views

Censoring program in C

So basically this program searches the string for a word and replaces that word with a new string. I want to modify this code so it replaces any word with the aesterisk. However I am unsure how to ...
user avatar
  • 1
5 votes
3 answers
438 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.
user avatar
0 votes
0 answers
23 views

How do I uppercase to lowercase and vice versa COMMENTS (in C, Ubuntu)

Is there any way to do uppercase to lowercase and vice versa for COMMENTS? For example: input_file.c #include <stdio.h> /* My FIRST program */ void main(void) { printf("Hello world!\n&...
user avatar
  • 1
0 votes
1 answer
42 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,...
user avatar
0 votes
1 answer
38 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 ...
user avatar
  • 109
0 votes
1 answer
37 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 ...
user avatar
  • 272
0 votes
0 answers
22 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....
user avatar
0 votes
0 answers
22 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 ...
user avatar
1 vote
0 answers
36 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....
user avatar
  • 11
1 vote
0 answers
20 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 ...
user avatar
  • 11
0 votes
1 answer
230 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?
user avatar
  • 11
0 votes
1 answer
124 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 ...
user avatar
  • 323
2 votes
0 answers
689 views

How to install a libc6 version newer than 2.31 on Ubuntu 20.04 focal fossa?

I'm using Ubuntu 20.04 focal fossa. I'm trying to install a package that depends on libc6=<2.33 or above. However, focal repositories only have version 2.31, which is causing dependency troubles: ...
user avatar
  • 4,924
0 votes
1 answer
1k 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 ...
user avatar
0 votes
1 answer
89 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.
user avatar
-5 votes
1 answer
53 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!"); }
user avatar
0 votes
0 answers
16 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....
user avatar
-1 votes
1 answer
33 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 ...
user avatar
0 votes
2 answers
85 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 ...
user avatar
  • 9
0 votes
0 answers
95 views

C pipes with execlp(). Code works for "head" command but not for "sort"

So my job is to write a function that will work like: ps -ef| tr -s ' ' :| cut -d: -f1 | sort | uniq -c |sort -n Here is my code: void pipe4() { int pdesk1[2]; int pdesk2[2]; int pdesk3[2]; ...
user avatar
  • 1
0 votes
2 answers
158 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. ...
user avatar
  • 9
1 vote
0 answers
79 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 ...
user avatar
  • 55
0 votes
0 answers
166 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....
user avatar
0 votes
0 answers
115 views

How to install the missing header sys/sockio.h?

I use Ubuntu 20.04 and want wo build a C program. But the sys/sockio.h header files is missing. Which package do I have to install? The command locate -b '\sockio.h' returns nothing.
user avatar
  • 123
1 vote
1 answer
781 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 / ...
user avatar
  • 23
0 votes
0 answers
28 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 ...
user avatar
0 votes
1 answer
197 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/...
user avatar
2 votes
1 answer
198 views

Is there a script where I can convert ppt to mp4?

I want to convert a .ppt to .mp4 file with a script. Is this possible, if yes how can I start ? Thanks for Ideas... I know I can export directly over Microsoft Powerpoint but I want a script which ...
user avatar
0 votes
0 answers
60 views

Installing and running mpack on a fresh ubuntu (Algo VPN) instance results in *** buffer overflow detected ***: terminated

I have created an Ubuntu 20.04.2 LTS instance via the Algo VPN scripts using google cloud. I SSH into the instance for the first time and execute the following simplified test case which results in ...
user avatar
1 vote
1 answer
338 views

C programming: Detect mouse pointer movement

I am working on a project in which I need to set a flag only when mouse pointer has not moved for a period of time (e.g: 30s): if the mouse was idle for 30s, set no_movement (no_movement=true;). So ...
user avatar
0 votes
0 answers
37 views

C program created many proccesses, crash the OS and stuffed 40GB into log directory

I create the following program which needs to "play ping pong" between a parent process and its child process. Even while working on it, while compiling, I noticed that my PC starts to work ...
user avatar
  • 103
0 votes
1 answer
663 views

missing libm.so.6 and libstdc++.so.6

I have a program that I compiled through qt creator and appears to work fine on my computer but I'm trying to run it on a remote computer cluster and it spits out these error messages. ./programs/...
user avatar
  • 3
0 votes
1 answer
65 views

How to include a generic library when calling the headers

this code gives me error #include <linux/mman.h> no such file or diretory while this works #include </usr/include/linux/mman.h> how do i change in order so i can use the first option?
user avatar
3 votes
1 answer
187 views

Error while compiling C program

I am new to ubuntu programming. When I Try to compile a C program it shows this kind of error fowler_nordheim_current.c:27:10: fatal error: gsl/gsl_sf.h: No such file or directory #include <gsl/...
user avatar
  • 31
0 votes
0 answers
160 views

After compiling and installing SDL, something happened to OpenGL and Vulkan

I tried to compile and install SDL2 from https://wiki.libsdl.org/Installation. Then I tried to test a program, I got a program file missing error for libsdl2-2.0.so.0: Program file cannot be opened. ...
user avatar
0 votes
0 answers
126 views

Highlight TODO and other keywords in the Text Editor (gedit) isn't working

I'm using the Text Editor (gedit) for couple months. I have downloaded the inkpot theme because it seems good. https://gist.github.com/carmelom/14e74271d4c03f3028f0e050be0e7f0a The problem is, it's ...
user avatar
  • 103
0 votes
0 answers
57 views

Alternative for mouseclick function in Linux?

So i got some problem with my window and i decide move to linux. I'm working with some c++ code that required windows.h, so i decide to change some of my code, so it can run in linux. one of my code ...
user avatar
0 votes
0 answers
41 views

compilling with gcc and g++: vp8_multi_resolution_encoder - compiling with gcc showing so many error but g++ showing only one

First of all, i have built libvpx for x86_64-linux-gcc. then Trying to use examples/vp8_multi_resolution_encoder.c. I need to convert a a video file into multiple resolution using vp8 encoder. I have ...
user avatar
0 votes
1 answer
852 views

#include <sqlite3.h> Not working with GCC - C programming

I have just started with C programming and am originally a python programmer so please try and not use very advanced words I wont understand much. So when I try using gcc as my compiler as I get an ...
user avatar
1 vote
1 answer
1k views

How can I solve this erorr "/usr/bin/ld: cannot find -libpthreads collect2: error: ld returned 1 exit status" if i already install pthread library?

**I write this c code and I already install a pthread library writting this command **sudo apt-get install lpthread-stubs0-dev #include <stdlib.h> #include <pthread.h> #include <stdio.h&...
user avatar
  • 21
0 votes
1 answer
79 views

Any Windows Manager Controler libraries for Python/C/C++?

I was wondering if there are any libraries for Python, C or C++ that help you interface with your window manager/x-windows? I am currently using os.subprocess and feeding it wmctrl bash commands and ...
user avatar
0 votes
0 answers
70 views

Does fgets hold somehow where it stopped reading the FILE *stream?

I am trying to get a sample program on how to write to a file: #include <unistd.h> #include <stdio.h> #include <string.h> int main(int argc, char **argv){ char buff[1024]; size_t ...
user avatar
1 vote
1 answer
52 views

Signal when PulseAudio load/unload modules

There is a way to know if PulseAudio has loaded/unloaded a module? Like a signal from PulseAudio? I know how to query for modules: pactl list sinks but I need some sort of IPC signal mechanism from ...
user avatar
0 votes
1 answer
928 views

error: ‘Default’ is not a member of ‘ns3::YansWifiPhyHelper’

I want to compile file "third.cc" on ns3.33 simulator and I have that error: error: ‘Default’ is not a member of ‘ns3::YansWifiPhyHelper’ 108 | YansWifiPhyHelper phy = YansWifiPhyHelper::...
user avatar
  • 13
0 votes
0 answers
47 views

configure: error: Cannot enable MemorySanitizer ubuntu18.04

make powerdns in ubuntu18.04 server by this option ./configure --enable-msan and I install 100+ packages but it could resolve error checking whether to enable MemorySanitizer... yes checking whether ...
user avatar
1 vote
0 answers
34 views

Inotify cannot detect valid path [duplicate]

I m using inotify to get events of file changes in directory. int fd = inotify_init(); for(const fs::path& p : fs::recursive_directory_iterator(filename)){ if(fs::is_directory(p)) { ...
user avatar
1 vote
1 answer
733 views

how can I read from a USB device without knowing the device name?

I have an Arturia, MiniLab, it is a serial, non block device. I would like to read keypresses from the device, but I cant figure out where the /dev/device is that I should read key presses from. I ...
user avatar
  • 13.9k
0 votes
0 answers
33 views

Is there an way to rotate a specific window from terminal?

I am using cava music player.So since cava by default appears horizontally , i wanted to change the orientation how cava appears to vertical or tilt the window so that it appears vertical.Is there any ...
user avatar
0 votes
0 answers
43 views

Shipping SDL2 C Project in Ubuntu

everyone! I have created a SDL2 project in Ubuntu using C and the terminal as compiler. I want to ship the project in order to send it to my friends. Does anybody know how to achieve that without ...
user avatar
0 votes
1 answer
4k views

Simple C hello world program is not working in Visual Studio Code [closed]

I am fairly new to C coding and cannot get a simple C hello world code to work with Visual Studio Code. The code looks like this: #include <stdio.h> int main() { // printf() displays the ...
user avatar

1
2 3 4 5
10