Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [c]

C is a general-purpose programming language

-4
votes
2answers
30 views

Trouble include c++ file in c

I try to add a string function to main fucntion of c program. When i get it from github & install it on ubuntu terminal wit make. I get this message In file included from vanitygen.c:34:0: ...
0
votes
1answer
22 views

USB C port seems dead - Thinkpad T580 and Ubuntu 18.04

On my new laptop one of the two USB 3 ports stopped functioning and as I didn't want to send it back for repairs I bought a USB C to USB 3 cable so as to have a spare, free, port. The second USB 3 ...
0
votes
1answer
23 views

How to link ffmpeg libs to my C program

I am new to Linux/Ubuntu. I just installed ffmpeg via terminal (sudo apt-get install ffmpeg). I found a tutorial on in it with C programming. The tutorial doesn't show how to link the libs as ...
0
votes
0answers
21 views

Installing FreeRDP and hit to error: field ‘des3_ctx’ has incomplete type

I was trying to install FreeRDP server using the link : https://github.com/FreeRDP/Remmina/wiki/Compile-on-Ubuntu-16.04 I hit to the below error during make and make install [ 25%] Building C object ...
0
votes
0answers
12 views

Can I create an executable file from a Code Blocks project?

I wrote a program using Code Blocks and I'd like to create an executable file that I can doubleclick to run. Is there a way to do so? Sorry if this is a duplicate, but I read a lot of posts and just ...
0
votes
1answer
42 views

Can't execute C executable file

I'm trying to use libusb for my project, but a mysterious problem occurred. I compiled the C source code with no errors. It successfully generated an executable C file into the current directory, but ...
0
votes
0answers
44 views

Error when trying to compile in old compiler(gcc-3.x)

//test.c #include <stdio.h> int main() { printf("Hello"); return 0; } I am on my Ubuntu 14.04 32 bit Virtual Machine. And I have tried to install gcc-3.(I don't know if I did it ...
0
votes
1answer
14 views

Error while building FleaFPGA-JTAG-Linux

I've been trying to compile FleaFPGA-JTAG-Linux for a while now but I keep getting the linker errors: cannot find -lftdti1 cannot find -lusb-1.0 When I run pkg-config --libs --cflags libftdi1 I get :...
1
vote
2answers
209 views

I get a blinking cursor instead of output when running this C program in Ubuntu [closed]

Here's my code for finding the distance between two points. My assignment makes it mandatory to make use of functions, hence a separate one for finding the distance. I don't get any syntax errors but ...
-1
votes
1answer
59 views

how do we compile and run a haskell program on terminal? [duplicate]

I have my program saved as prog.c how do I compile it and run it?
0
votes
1answer
109 views

How to compile Linux kernel module: printk missing?

So I'm trying to compile a simple kernel module on Ubuntu 18.04, kernel 4-15.32 generic: #define MODULE #include <linux/module.h> #include <linux/kernel.h> int init_module(void){ ...
0
votes
0answers
28 views

How do I use a Dialog input box to take integer and store it in C? [duplicate]

I am trying to use Dialog from within a C program to prompt the user to enter an integer. How do I store that entry in a variable within my program? An example of a Dialog yesno prompt I am using ...
0
votes
1answer
847 views

Unable to locate package libesd0-dev on Ubuntu 18.04 [duplicate]

I used: sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-2.0 \ guile-2.0-dev libsdl1.2debian libart-2.0-dev libaudiofile-dev \ libesd0-dev libdirectfb-dev libdirectfb-extra libfreetype6-...
0
votes
1answer
82 views

How to create Ubuntu graphic C programs without Gtk?

Is there some sort of program or something to turn your text program graphical in C? Thank You, CCM
1
vote
1answer
251 views

ubuntu, syntax error near unexpected token `('

I want to run a c program on ubuntu 18.04, on a virtual machine, and I get this error: ./test.c: line 3: syntax error near unexpected token `(' ./test.c: line 3: `void main(int argc, char** argv)' I ...
0
votes
0answers
36 views

Use curses to execute separate code

I am trying to create a simple GUI that will let the user execute a separate, standalone C program. The program is mildly complex but self-sufficient. Once it gets executed, it'll perform everything ...
0
votes
1answer
158 views

netbeans missing native build tools

My Goal I want to have a fully functioning NetBeans C/C++ on my ubuntu 18.04 A small background The first problem I've encountered was build host not connected after a little research I've ...
0
votes
2answers
405 views

<fcntl.h> No such file or directory

I am trying to run the available C code at GitHub for bloom filter (https://github.com/jvirkki/libbloom). When I try to compile I get an error: fcntl.h No such file or directory. I am using Ubuntu 16....
1
vote
1answer
27 views

Free heap memory

So I'm using Ubuntu for programming I use atom text editor with gcc compiler for C. I want to ask what will happen if I don't clear memory allocated by malloc or calloc? Will the OS take care of it or ...
2
votes
2answers
109 views

Building git package and trouble with CMake

I'm trying to build finalhe and exfat-nofuse. It's my first time trying something of that sort. I'm using lUbuntu 18.04. I tried following info found on the finalhe GitHub page and these links: https:/...
0
votes
1answer
31 views

How does Ubuntu formats any flash drive with file systems in terms of Code?

I was thinking how can we design a file system of our own for study and experimental purpose. But for doing that I am not able to find proper documentation and resources. I also want to know even if ...
0
votes
1answer
21 views

Find latest modified *.c file and compile it within terminal with pipelining?

Lately I have coded a little bit more with the terminal in Linux to get a deeper understanding of programming. Right now I am trying to automatize the compiling process with the following command: ...
0
votes
1answer
79 views

How to loop a program?

I'm using a program named 'SExtractor' which takes astronomical images in imput and subtracts the skyglow giving as output the same image corrected. More specifically the output it's composed by four ...
-2
votes
1answer
115 views

PROBLEM WITH COMPILER C/ PLEASE HELP ME [closed]

My first language is Spanish, and my use of English is not the best, but I need some assistance in debugging the following program code since it produces an error when compiled. CODE: #include "...
1
vote
3answers
358 views

libavcodec - codec not found

I am trying to run this program from ffmpeg c documentation. It is compiled successfully. But showing "codec not found" when I am trying to execute. I am using below command to compile. gcc -o ...
1
vote
1answer
53 views

C++ code cannot create output file on Ubuntu 16.04 [closed]

Using Ubuntu 16.04 with kernel 4.16.7. I'm trying to benchmark an SSD using the code I found here: https://cristianadam.eu/20160410/c-plus-plus-i-slash-o-benchmark/ This test uses three different ...
0
votes
0answers
37 views

Perf does not annotate .c files called by Rust

I am using perf to profile a rust application which calls some .c files. I want to annotate the .c functions. However in the perf report i can find only rust code annotated. I have compiled the ...
0
votes
1answer
120 views

Set debugger from at&t to intel [closed]

I want to set my assembly debugger from at&t to intel in gcc. I'm currently on ubuntu 18.0. How can i do this?
0
votes
1answer
197 views

Undefined reference to symbol acos@@GLIBC_2.2.5 while compiling xpdf

I get the following error while compiling xpdf using make. I've tried using the command: LIBS=-l make but it doesn't work. I know the problem is that the c compiler cannot recognise the math code in ...
0
votes
1answer
604 views

File doesn't open using fopen() function in C [closed]

I'm using Ubuntu 18.04 on VMWare Fusion. I have no idea why the file doesn't open using fopen() function in C. The code is below. #include <stdio.h> #include <stdlib.h> #include <errno....
1
vote
1answer
237 views

sublime text does not open

I've installed sublime text 3 using the instructions from this question, but after doing subl it doesn't open anything.... I am trying to open C files. It doesn't do anything:
0
votes
1answer
303 views

Perf linux tool : Function name not shown in the symbol column [closed]

I am not sure if this is the right forum. I am trying to benchmark a simple compiled c code but i cannot see it's main and child functions in the perf report. All i see are system functions and hex ...
1
vote
1answer
35 views

PHP exec() has write permission error despite write privilege

I am running 7.0.28-0ubuntu0.16.04.1, under LAMP, on two Ubuntu 16.04. The C code, to open the file for writing is: #define ERROR_OPENING_FILE -4 fprintf(stderr, "Open output file: /var/www/...
1
vote
1answer
708 views

How to compile C program file in Ubuntu 18.04

I can't compile a C file in Ubuntu 18.04. In terminal I used this command: $ gcc -o abc.o abc.c -lm, but it says that gcc is not found. This exact command can compile a C program in Ubuntu 16.04 (...
0
votes
0answers
34 views

Trouble with connection mongodb to c project

IDE: Netbeans Error message I downloaded mongodb c driver and installed it using instruction from official site, but now when I trying to compile my project I get an error: ...
0
votes
0answers
356 views

Code::Blocks collect2 ld returned 1 exit status but it's working on Windows

I am using Xubuntu 17.10 with Code::Blocks 17.12. I am writing a program, with linked libraries (.a files), that I linked in project/build options with a relative path. On Windows, there's no problem,...
1
vote
0answers
140 views

Undefined symbol error

I'm working on a base project by someone else and I'm kind of new to the Linux system. I know how to use sqlite3 in Windows' Visual Studio, however in Linux it's not working. I've come to the ...
0
votes
0answers
201 views

Can't run CloclWorkMode Tether app in ubuntu

I have been trying for few hours to run CloclWorkMode Tether app for ubuntu. So I followed the instructions given by the application itself. My problem is when I try to make node modules before ...
4
votes
1answer
520 views

Can I act on the event that a window opens without polling?

I am trying to find a way to detect the event of a window (any window) being opened in Ubuntu 16.04 I would like to be able to detect the "window open" event and check if the opened window was my ...
2
votes
1answer
91 views

Can't compile Ardour: “Can't find -lfftw3f_threads”

I am trying to install Ardour from source. I successfully completed the configuration process after a few failed attempts and installing the required libraries. Now the installation process cancels ...
1
vote
1answer
704 views

How do I print backslash followed by newline with printf?

Using Python, I get $ python3 -c 'print("\\\n")' \ $ That is, one backslash and one newline, followed by an extra newline inserted by the interpreter. Using C, compiling the code #include <...
1
vote
0answers
32 views

Question regarding rtl_fm and specific USB port connections

I am planning to use 2 RTL-SDR dongles on a single computer. The thing is, they will be operating on 2 different frequencies, and so different antennas will be used. I would like one instance of ...
4
votes
2answers
6k views

Can't run my hello world in C

I'm trying to write a basic program in C using gedit or sublime text (which I prefer), but no matter what I do when I try to compile or run, or even while writing, I have no option to use 'stdio.h' or ...
0
votes
0answers
123 views

gcc doesn't compile C How To Program 'create a random access file' tutorial

The tutorial on File Processing in C How To Program 6th Edition (Chapter 11 Fig. 11.11) creates a random access file sequentially. fwrite and fread are used in the code to create 100 blank records ...
0
votes
0answers
1k views

How to resolve: undefined reference to `pthread_create' while running cmake command in cura-build

I have an ubuntu machine to run cura-build from the following doc. Refer: https://github.com/Ultimaker/cura-build#ubuntulinux My gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5) while ...
1
vote
1answer
2k views

system(“pause”) for linux in gcc C

What is the system("pause") equivalent in Linux on C language. not C++. I want to use that for my c program. Theres a logout function. But before it returns to the main login function i want to give ...
0
votes
1answer
283 views

GCC -std=gnu99 error

I'm trying to compile a C code with this command gcc -Wall -m32 -std=gnu99 -o <filename> <filename> Instead of getting an output file, I get this. /usr/bin/ld: cannot find Scrt1.o: No ...
0
votes
0answers
283 views

Add New user and password with sudo permission in Linux programmatically [duplicate]

Add New user and password with sudo permission in Linux using programmatically in C or C++ language. Exist solution like How can I add a new user as sudoer using the command line? ,In this case you ...
0
votes
0answers
46 views

How to include ssl lib when running apxs on ubuntu

I am compiling my apache c module using this: sudo apxs -i -a -c mod_ex.c now I need to use the lib openssl. what should I use to include this lib? I tried with adding -I /usr/include/openssl but ...
2
votes
2answers
275 views

C Library Function Actual Implementation

I was wondering where I can find the actual C implementation of atoi() (or other such functions). I looked into stdlib.h but it seems like atoi is not implemented there. Is there a way to view the ...