Tagged Questions

C is a general-purpose programming language

learn more… | top users | synonyms

-2
votes
0answers
16 views

What is nostartfiles option in gcc? [on hold]

I am trying to compile and run a C program without main function. i cannot run it normally. I written a small program without main function. try to compile it with normal way like cc example.c. But i ...
-2
votes
0answers
10 views

solution for glade Unable to create object GtkHeaderBar Ubuntu 14.10 [on hold]

I am new with gtk. I am trying to follow tutorial from gnome developers site and get following error while opening ui file. Is there any solution or do i have to edit xml with emacs.
0
votes
1answer
16 views

Sending different kill signals to init - how to log

I have to write a C program to check how init reacts to different kill signals, however I am not sure how to log it - for example signal number 14 crashes the ubuntu, then some higher one turns it ...
0
votes
2answers
36 views

How to write a file without new line at the end in C ubuntu14.04? [closed]

I am using a C program in ubuntu 14.04 operating system which needs to read a single lined file containing just one line in the whole file). Now, I need to read this single line and save into another ...
0
votes
1answer
30 views

FT_Read is not working properly [closed]

I am writing code for serial programming for serial communication between FTDI device and Desktop through XBEE. I am writing command on device for (in example) reading Battery Voltage Current and ...
-1
votes
1answer
39 views

json_object_iterator.h not Found

I am trying to parse JSON object from C program. but i got following error. my c program contains json/json.h header file. this header file is causing below error. May I need to install anything. I ...
0
votes
2answers
42 views

Installing C POSIX libraies in ubuntu 14.04 LTS

I'm trying to install the following C POSIX libraries in ubuntu 14.04 but for some reason some of them won't intall. The libraries; sys/ioctl.h unistd.h locale.h ncursesw/ncurses.h Comands sudo ...
1
vote
0answers
27 views

Permission denied when running C programs outside the Home directory [duplicate]

I have been creating some C programs and I have saved them to my Home directory while editing. I have compiled them with gcc and then run the executable file with ./ and they work fine. However, when ...
0
votes
1answer
24 views

How to compile with X11 library?

I'm trying to compile this code here: http://lists.kde.org/?l=kwin&m=115435217715650&w=2 I compile it with this line of code: gcc -lX11 -lstdc++ -L/usr/X11/lib -o icon icon.c but it keeps ...
0
votes
1answer
44 views

How to use the c/c++ code to change ubuntu's background

Or any other way.I want to make an application to make my desktop pretty.
0
votes
0answers
78 views

How to install C++ libraries in Ubuntu 14.04

I've been searching for a couple of hours but I haven't found anything yet. I want to know which is the preferred method for installing C/C++ libraries in Ubuntu 14.04. Is there a CLI command or ...
0
votes
0answers
20 views

No SDLIMAGE found while running ./configure file

recently i installed libsdl1.2-dev to install a game, after installing it in system. I run ./configure file and I am getting new error checking for sdl-config... /usr/bin/sdl-config checking for SDL ...
0
votes
1answer
17 views

get pdiffer working in ubuntu

I am trying to use pdiffer in ubuntu. It is a python interface to the PerceptualDiff tool. https://pypi.python.org/pypi/pdiffer I installed pdiffer using pip (after installing pip) I installed cmake ...
0
votes
2answers
28 views

wallpapers for ubuntu, paint app [closed]

I want to have new wallpapers for ubuntu desktop. How to get them, where? Also what is paintbrush app named in ubuntu. In windows it is mspaint. Is C compiler available from software centre?
0
votes
0answers
69 views

C/C++ Query EDID at boot time

I'm looking for a way to query EDID data at boot time on my Android system. I think I can use ioctl calls and I see that the frame buffers are at /sys/class/graphics/fb*. But currently I'm just ...
1
vote
1answer
142 views

Why can't I use conio.h or ncurses.h?

I am new user to Ubuntu. I wrote a simple program in C. When I try to compile it to use conio.h, the compiler gives me fatal error. So I tried by ncurses.h, but still I am getting same error.
0
votes
2answers
94 views

gcc compiler in ubuntu

I created a simple C program which prints "Hello world" as output and saved it as test.c. Compiled it in terminal as gcc -o test test.c & run it as ./test but the there is no output showing. If ...
1
vote
1answer
133 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 ...
0
votes
0answers
5 views

More window objects than are open?

Using c and x11: XQueryTree XGetWindowProperty XInternetAtom of _NET_WM_USER_TIME Full code is in Javascript version of CTypes here: GitHubGIST :: Noitidart / ...
1
vote
1answer
22 views

Stat a PID for claim time?

Is it possible to stat a process ID to get the time it was claimed?
1
vote
2answers
107 views

Are fcntl constants in Ubuntu different from other OS?

I found the problem with my fcntl implementation in js-ctypes. I was using the wrong constant values. Everywerhe I look though they have it different, For example: ...
0
votes
1answer
169 views

font configuration warning [duplicate]

when I was doing c program in Ubuntu 12.04 , there is a font configuration warning shown by terminal. What should I do? shayna@shayna-Vostro-3446:~$ gedit hello6.c Fontconfig warning: ...
0
votes
1answer
40 views

GCC Compiled program not running in a new Window

What i am Doing? I have created a simple c Program that runs and executes a system Command the code is as follows #include <stdio.h> #include <stdlib.h> #include <string.h> ...
1
vote
0answers
49 views

Why does sudo prevent catching SIGTSTP (Ctrl+Z)?

This program is written to catch SIGTSTP (Ctrl+Z) and bypass its normal effect, printing a message and returning to its normal operation instead of allowing its process to be suspended: ...
0
votes
1answer
71 views

Setting up lubuntu to access /usr/src/linux-headers-3.1.x.xx?

I need to access a block of memory assigned by a FPGA to a PLX chip. Now I dont think that will be to much of a problem accept when I try and use the /include/linux headers they seem to be somewhat ...
1
vote
2answers
121 views

.desktop file doesn't execute a script, works fine when run by hand

I am having problems with my .desktop files. I have a shell script that constantly watches for a file to be put into the "Downloads" folder. When a file is put into the folder it automatically ...
0
votes
0answers
36 views

Extracting a statically linked library

Is it possible to extract a statically linked library from an executable (e.g. turn it into an .so file), when I have the .h header file declaring the symbols? I also already have the .so file, but ...
0
votes
1answer
29 views

What are the files needs to be edit to add a user? and what to be write?

I am trying to write a C program to add a new user to my Ubuntu 14.04. I edited 1) /etc/passwd sachin:x:65535:1:sachin:/home/sachin:/bin/bash 2) /etc/shadow ...
0
votes
1answer
38 views

how do i run main file which function is store in another file and also the header file too?

// mainheader.h int square(int b); // maiNfunction.c #include"mainheader.h" #include<stdio.h> int square(int b) { int y; y= b*b; return (y); } //=====maiN.c file ...
0
votes
0answers
42 views

How to install and use (link) librsync library

I installed the librsync library using: sudo apt-get install librsync-dev librsync-dbg. But then how do I link this library statically? I Tried: gcc -o my_prog my_prog.c pkg-config --libs ...
0
votes
1answer
36 views

how to implement the functions which are defined inside the conio.h

I wanted to use the conio.h header file in one of my C codes but as we know the header file is not available for unbuntu, what should we do if we want to implement the functions if the header file ...
0
votes
1answer
370 views

Should `arm-none-eabi-gcc` include a `stdio.h`?

I'm trying to build a simple example from the SDK for the TI CC3200 (Cortex M4), but when I try to compile it complains about stdio.h. make CC ../main.c ../main.c:45:19: fatal error: stdio.h: No ...
0
votes
2answers
89 views

Newbie C programming question [closed]

Can anyone explain why the output of this code is 2? I mistakenly thought it was 3. int array[] = {1, 2, 3}; int *address = array; array[0] = 2; array[1] = array[2]; array[2] = *address; ...
0
votes
0answers
39 views

Ubuntu 14.04 freezed when too much memory in malloced

I am trying to run a C program which mallocs the memory as per the input given by user. Whenever I input something as big as 1000000000 rather than returning NULL value, my Ubuntu 14.04 machine ...
0
votes
1answer
124 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 ...
1
vote
1answer
99 views

Getting time in ubuntu [closed]

#include <sys/time.h> #include <stdio.h> int GetTime() { struct timespec tsp; clock_gettime(CLOCK_REALTIME, &tsp); //Call clock_gettime to fill tsp fprintf(stdout, ...
0
votes
1answer
67 views

ALSA prgramming in C

I'm using a C program that help me recording from my audio device here is the code : /* Use the newer ALSA API */ #define ALSA_PCM_NEW_HW_PARAMS_API #include <alsa/asoundlib.h> int main() { ...
-1
votes
1answer
56 views

unfamiliar codes in iw [closed]

Recently I am trying to understand how the codes in iw works. In iw.h, I encountered the following: #define __COMMAND(sect, name, args, nlcmd, flags, idby, handler) \ static const struct cmd ...
1
vote
0answers
486 views

Cmake fails while configuring OpenCV

I'm trying to buid OpenCV and use it in Qt. I have installed all required packages for OpenCV and Qt, after that I tried too run cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ...
2
votes
2answers
444 views

ls system command not showing terminal colors

I've just been fooling around with some code in C, an example of a really basic program is as follows which just, obviously, lists the directories using the ls system command. #include ...
2
votes
0answers
170 views

gstreamer pulseaudio echo cancellation

I'm implementing a voip application using gstreamer, i use the example of the rtp in the plugin-good! i want to implement echo cancellation, i couldn't use the speex echo canceller with gstreamer ...
1
vote
0answers
13 views

Library for Audio files

I have written a project in Matlab, using some signal processing (fft,convolution,PSD etc), and I have to put it on ubuntu , for that I need to write a project in C, and I was wondering if there ...
0
votes
0answers
25 views

How to access terminals with their names through C program?

How to access a terminal through its name in C program? I can only access the current terminal in which I am running the program through system() function. I want to access multiple terminals ...
0
votes
1answer
497 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: ...
1
vote
2answers
1k views

Are there drivers for OpenGL 4.3 for [AMD/ATI] Seymour [Radeon HD 6400M/7400M Series] (Ubuntu 14.04)

I want to be able to do opengl4.3 c/c++ programming, the [AMD/ATI] Seymour [Radeon HD 6400M/7400M Series] should be able to support it, I just don't know what drivers I have to install Also I have ...
7
votes
1answer
10k 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
1answer
1k views

How to enable c99 and c11 on gcc?

When I compile the following code it gives compilation error that error: ‘for’ loop initial declarations are only allowed in C99 mode for(int i = 0; i < 5; i++) and to compile your code use ...
1
vote
0answers
50 views

'__FDELT' and '__FDMASK' not declared in this scope (posix_types.h not included)

I'm running Ubuntu 12.04 LTS, 64bit version. I'm getting the following error when compiling a C++ program: ../elements/userlevel/socket.cc:477: error: '__FDELT' was not declared in this scope ...
1
vote
0answers
51 views

Calculating postfix expressions using stack [closed]

What is wrong with my calculate function? All other functions work fine but when I try to calculate a post fix expression, it adds some weird symbols to my stack. void push (char operand){ ++top; ...
0
votes
1answer
19 views

Upgrade restart fail

Upgrading from v13.04 to 13.10, all went well until "restart to complete"--screen did not come up for restart (Nvidia GeforceGTX650). I tried various suggestions, but now cannot get even Grub menu on ...