C is a general-purpose programming language

learn more… | top users | synonyms

0
votes
1answer
10 views

XPDP2 make error

Below is the error I keep coming across but im unsure on how to fix it. I have tried looking elsewhere but I cannot seem to find a clear answer on what the problem is or if this problem even matters. ...
-1
votes
0answers
13 views

how to fix execstack()? [closed]

When running C program it showing an error "stack smashed detected". I disabled the stack smash detected. My program went into a loop. Again need to enable the stack smashed detected. I surf for ...
0
votes
2answers
26 views

What am I missing, so I can compile my source? I'm new at this [closed]

#include <stdio.h> #include <stdlib.h> #include <string.h> #define password "Please enter your password" int main(int arge, char *argv[]) ( char pass[100]; printf("Please ...
1
vote
1answer
27 views

SNAP Installation C++

I am new to Linux and working in its environment. I have trouble understanding and installing SNAP library for C++ on Ubuntu 14.04. I am following this tutorial. Inside the SNAP directory I run the ...
0
votes
1answer
26 views

gdb - load kernel module for remote debugging

Ubuntu 14.04 LTS: peter@peterubuntu0:$ insmod mymodule peter@peterubuntu0:/sys/module/mymodule/sections$ cat .text .data .bss 0x0000000000000000 0x0000000000000000 0x0000000000000000 So how do I ...
0
votes
1answer
39 views

How to open new terminal by C code?

I am using ubuntu 14.04 and Qtcreator to complile a code. I am able to run a terminal by code system("/home/salman/find_location/start_yarp.sh"); But on the next line i have ...
2
votes
0answers
29 views

Debugging kernel running on AMD target from Intel host - how to return control to gdb?

I have compiled kernel 3.13.0-55 on Ubuntu on both AMD and Intel machines. I tried to copy compiled kernel to Intel target but it won't boot with that one. Therefore I have compiled the same version ...
23
votes
2answers
30k views

fatal error: sys/cdefs.h: No such file or directory|

It has been weeks that i am trying to use Code::Blocks IDE to program Atmega16, however, i am hindered by the following error while compiling/building the program in C::B ...
0
votes
0answers
25 views

Running Posix threads on Ubuntu

I am trying to run posix threads in a c programme and I'm getting these errors: make: *** [HPCFilter] Error 1 HPCFilter C/C++ Problem undefined reference to `pthread_create' binning.c ...
0
votes
0answers
29 views

implementation of “jobs” command in C

i tried with this : system("ps -a"); but I don't think this is a good way. This command should list all running processes created by my shell.. EDIT: Yeah i'm talking about the shell that ...
8
votes
2answers
3k views

Installing Valgrind on a 3.x Kernel

I was reading Learn C the Hard Way when I stumbled upon and followed the instructions for installing Valgrind, the C debugger. However, when I ran ./configure to setup build configurations, I got ...
1
vote
3answers
14k views

how to compile a c program that uses pthread.h?

I'm a beginner and I'm new to Ubuntu. I just installed it and want to run a C program. I have no idea what platform to use or where to write the code. I need to use pthread.h header file in the ...
1
vote
0answers
35 views

bug in ncurses.h? [closed]

I have been trying to compile a program I have written in C. I notice that there is an error in compiling saying: clock.c: In function ‘main’: clock.c:22:2: warning: passing argument 2 of ‘wgetnstr’ ...
1
vote
2answers
2k views

libusb program not compiling

I am trying to compile a program that uses libusb library in Ubuntu 12.04. I have installed the libusb-1.0-0-dev. However, when I try to compile a program as below: #include<usb.h> ...
0
votes
1answer
52 views

Is it possible to send keys to inactive window via any c/c++ library?

I'm developing a program where I need to control an inactive window by sending a couple of keys. I was wondering if there is any c/c++ library to do so on Ubuntu (and linux in general) ? I googled a ...
1
vote
2answers
2k views

Error running C program compiled with Geany IDE Error Code: 127

I installed Geany IDE via Ubuntu Software Center. Wrote a hello world prog in C and it compiled successfully but when i tried to run it, it gave me this error: ./geany_run_script.sh: 5: ...
0
votes
1answer
27 views

error with .data file,C [closed]

I have been trying to compile a C program that receives data from a .data file.Unfortunately,I always get the following message: input.dat.2:1:error: expected identifier or "(" before numeric constant ...
1
vote
1answer
18 views

How to debug a process developed in C running as a Wi-Fi Access Point?

I have two processes developed in C. The first one is running as a WiFi Access Point in Ubuntu machine and the second is running as a controller in another Ubuntu machine in the ethernet network. This ...
10
votes
3answers
10k views

Valgrind does debug error

I have been trying to follow the online tutorial for Learn C The Hard Way. However after setting up valgrind (I followed other links that help setting up valgrind on ubuntu 12.04), when I try to ...
0
votes
2answers
79 views

Difference between C programs and shell scripts receiving signals from fuser

I have written the shell script below for a lab in my college. It must look at a log file being upgraded frequently from another process and create a number of copies passed at invokation. Here is the ...
0
votes
0answers
22 views

Ubuntu 12.04 Desktop Out

I've been stuck with this several hours and it seems I am not making headway. I did Ctrl+Alt+F1, logged on and I got error while loading shared libraries: libstdc++.so.6: cannot open shared object ...
8
votes
1answer
1k views

Does Ubuntu automatically release memory allocated by a C program as the program terminates?

I have written a C program containing code allocating memory using the malloc() function. If I don't free up the memory using the free() function, will Ubuntu release it automatically?
0
votes
1answer
102 views

How to install a custom library written in C?

I want to install Stanford Portable Library on my system (Ubuntu 14.04). Can anyone please instruct me how to do it?
3
votes
2answers
310 views

Ubuntu Terminal: C program (or other solutions) to kill processes running on a specific port and start xampp [closed]

Can anyone help me? The program's objective is to kill the processes running on port 443 and to then start xampp automatically. What I've done: #include <stdio.h> #include <stdlib.h> ...
0
votes
0answers
29 views

How to run a compiled cpp file after booting up the system [duplicate]

I am using an arm v7 soc system which runs ubuntu very well. I can run my compiled cpp file (compiled with g++) perfectly from terminal by ./myproject. However i want code to start automatically ...
0
votes
0answers
15 views

conio.h header file giving an error during compiling C program in ubuntu [duplicate]

My code for a simple C program is #include<stdio.h> #include<conio.h> void main() { printf("This is demo program \n"); getch(); } when I am trying to run this c program. I am ...
7
votes
1answer
210 views

How to log bash history by editing bash source?

I'm using bash-4.3.30. I need to log all my commands history on a single file. I can do that by editing the bashrc or bash_profile but I'm not going to do that. I want to play with bash source ...
4
votes
1answer
247 views

How to compile programs that use term.h?

I try to compile the code below: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <term.h> //#include "/usr/include/term.h" void clear_screen(void) { ...
0
votes
1answer
680 views

Compiling C code for ARM processor on Ubuntu 12.04

I am compiling my simple "Hello world" C code using the following command: arm-linux-gnueabi-gcc-4.4 test.cpp -o test It generates an error: arm-linux-gnueabi-gcc-4.4: error trying to exec ...
0
votes
0answers
46 views

Setting up environment for Nvidia OpenGL Samples with Netbeans

As title, I would like to set up the environment for the Nvidia OpenGL Samples with Netbeans. You can find the SDK here In Netbeans I tried to choose the first one.. I gave it the directory with ...
1
vote
1answer
51 views

Abnormal behaviour of malloc() fuction?

I was playing around with alloc functions in my Ubuntu 14.04 64-bit, gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) and found that malloc returns memory with initializing it to zero. Which is quite weird ...
0
votes
1answer
22 views

Install Ubuntu on Drive C Only

How do I install Ubuntu on Drive C only? I backed up all my data on Drive D and I'm afraid that I might lose them all.
1
vote
2answers
119 views

GCC Fatal Error

everyone Here's my problem; So, I'm new to Ubuntu and programming and I just wanted to start with C. I created the classic "hello.c" file #include <stdio.h> main () { printf("Hello ...
0
votes
1answer
79 views

Ubuntu Kernel Source Code for NAT Firewall [closed]

In TCP Communication, when the packet is being transferred from ethernet to network(IP) layer, I want to print the data present in that packet? I am working on linux (ununtu 14.04). I got some ...
9
votes
2answers
4k views

Why Ubuntu uses eglibc instead of glibc?

I checked for the libc version on my Ubuntu 64bit 12.10 machine by issuing the command ldd --version. I saw that Ubuntu uses eglibc instead of glibc. As egiblc is for embedded machines, Is there a ...
1
vote
1answer
182 views

How to run C program on 14.04?

I'm trying to run some C programs using Geany and Code::Blocks. After coding them, when I run them, a message is showed in the terminal like this: In Code::Blocks: sh: 1: /home/c program files/2: ...
0
votes
0answers
51 views

how to install GLU files in ubuntu 14.04?

I am running Ubuntu 14.04. I am trying to execute a opengl code in C in but during compilation it is not accepting glu files but my code contains it. how should I include glu files during ...
0
votes
1answer
69 views

Any c functions to simulate double click on file?

I have some .desktop files and am looking for c functions that make it as if user double clicked on the .desktop files. Here are my desktop files: https://www.youtube.com/watch?v=Yc19BzLTnDE Thanks
2
votes
1answer
112 views

Can't compile tiny C code which uses librsvg

I am almost complete noob in linux world and I use Ubuntu 14.04 LTS with gnome-session-fallback (compiz) under VirtualBox on Windows 8.1 machine. My goal is to use this library: ...
0
votes
0answers
132 views

CODEBLOCKS - warning: GDB: Failed to set controlling terminal: Operation not permitted

I've installed Code::Blocks 13.12 in Ubuntu 14.04 through official repositories. When I compile, everything goes OK. But when I debug, the following message is shown at the sheel: warning: GDB: ...
0
votes
1answer
42 views

Problem with compiling C code in terminal

I've been having a problem with compiling. I used the following test C code below and saved it as test.c in Home folder. #include <stdio.h> int main() { printf("Bruh!"); return 0; } ...
2
votes
0answers
182 views

Undefined reference error while using custom system call in kernel 3.19

I'm trying to import new system call in the kernel 3.19. I've followed the tutorial given here! This is my simple code to implement factorial calculation via system call. #include ...
0
votes
0answers
11 views

Move/associate window from one group to another

I'm looking for a cross linux way to move a window from one group to another group. I thought of and tried this way but it didnt work, i share a screencast showing it doesnt work. In this screencast ...
0
votes
0answers
21 views

Dissociate window from .esktop file and chane icon with XChangeProperty

This is copy paste code that can be compiled with gcc -o icon icon.c -L/usr/X11/lib -lX11 -lstdc++. It opens a new window and sets its icon with XChangeProperty on _NET_WM_ICON. This proves it works ...
0
votes
0answers
62 views

Compiling an individual kernel module (Debian/Ubuntu)

I need to modify the ELF loader's kernel implementation of an Ubuntu 14.04 distribution. Having downloaded the sources using: sudo apt-get source linux-image-$(uname -r) I ran the configuration ...
0
votes
3answers
2k views

How do I get the pcap lib on Ubuntu?

I have a programming assignment where I need to use the pcap lib. #define _BSD_SOURCE #include <stdio.h> #include <stdlib.h> #include <string.h> #include <pcap.h> // <-- ...
2
votes
1answer
235 views

What C is PS using to Determine Process Info Programmatically

In both linux and macos we can get PID info, start time by using bash: ps -p PID_HERE -o lstart=. I was going to use lstat and plan on it. But just out of curiosity: Programatically ps has to be ...
3
votes
2answers
873 views

How to let an icon in the launcher wiggle?

Trying to let my python application inform the user by wiggling or shaking its icon in the launcher, I found: Wiggling seems to be the "urgent animation": How can I change the wiggle time of ...
0
votes
1answer
60 views

Geany no support greek language

I am using Geany for C programming. My code contains some greek sentences,I set the Default Encoding to GREEK(ISO-8859-7), but when I try to execute the program the greek letters show up like this. ...
2
votes
1answer
183 views

How do I handle a “No such file or directory” error for a header file from make?

When compiling a source package, I got an error from make that looked like: In file included from foo.c:28:0: bar.h:23:18: fatal error: bar.h: No such file or directory #include <bar.h> ...