C is a general-purpose computer programming language used for operating systems, games and other high performance work and is clearly distinct from C++. Questions about programming in C are off topic and will be closed or migrated. Consider asking your question at Stack Overflow instead.

learn more… | top users | synonyms

1
vote
1answer
119 views

How to create an operating system on top of Ubuntu 13.10

I want create an operating system the way Mac did, building a program on top of a Unix operating system. I am planning to make a small operating system with a small amount of functions using C. I do ...
1
vote
2answers
1k views

Building GCC and Binutils on Windows 7 x64

I am trying to build GCC following the instructions in: Building GCC. At the moment I am building binutils but getting the error: * BFD does not support target x86_64-unknown-cygwin. Look in ...
1
vote
1answer
616 views

How do you add RefocusIt to Gimp?

I'm trying to compile Gimp with a special plugin called Refocus-It. I know that I need to compile something. Can somebody please explain what needs to be done? I would like to accomplish this using ...
1
vote
1answer
767 views

Does stat/lstat on nonexistent file cause a disk seek?

When searching for a library file from a right folder, my application currently does couple of lstat's for the possible locationslocations. Now I'm wondering whether these lstat's (application is ...
1
vote
0answers
389 views

So I stupidly install newlib, and probably overwrote references to glibc. How can I recover glibc?

I forgot to set a make --prefix and I think it wrote to /usr/local/ by default and now I'm having all kinds of errors. I'm on ubuntu natty, what's the easiest way to resurrect glibc. I've tried to ...
0
votes
1answer
368 views

C compiler in command prompt

It is my understanding that the Windows operating system (Windows 7 to be exact) must come with a C compiler because the OS is written in C. How can I access such a compiler to compile my C source ...
0
votes
4answers
352 views

Why would a compiled and linked high-level language execute slower than Assembly/machine code? [closed]

Say I compile and link C in to a flat binary or some executable output format to run on a bare machine. If I optimized and fed the direct binary to the CPU upon boot up, why would the resulted format ...
0
votes
2answers
115 views

Why execute permisiions along with write permissions needed for creating file in c(Linux)?

I am trying to create a file from my c source code on linux. I am using dd command for reading from a file and writing in to a file by creating there. If i don't have execute permissions(I have write ...
0
votes
1answer
136 views

Which GUI framework is used to make Ubuntu?

I'm interested to know, Which GUI framework is used to build ubuntu? As well i know it is built in C/C++. But what GUI is used to make Ubuntu? Help would be appreciated!
0
votes
3answers
1k views

GCC won't work. problem with /usr/local/include

I was trying to add a new library/header and seem to have broken gcc. Specifically, I used the command: $ sudo cp mylib.h /usr/local/include This seems to have replaced the /usr/ directory with a ...
0
votes
1answer
588 views

Voices disappear when using headphones

How do I declare a variable in C? P.S. I have a pair of SteelSeries Siberia headphones. I've noticed that when watching some films the voices are completely silent, yet when I unplug the headset and ...
0
votes
1answer
147 views

BASH script that generates a header file with function prototypes

I am doing a C project which involves lots of static linking. To get rid of "implict function declaration" errors I will use a simple solution - a header file with function prototypes. I wrote this ...
0
votes
1answer
40 views

Executing a c operating system inside VMWorkstation [closed]

I am planning on starting development a small, simple operating system, however I am unsure about a starting point.Would running the code inside a VM without a OS in it be the best approach at ...
0
votes
2answers
374 views

How to execute a compiled C program in Linux terminal

#include<stdio.h> main() { int a,b,c; printf("enter the value of a and b for addition:\n"); scanf("%d %d",&a,&b); c=a+b; printf("Addition of ...
0
votes
1answer
207 views

Vim inserting C style comments

:command Linecomment :normal ^i/*<ESC>$a*/<ESC> The above command is one that I came up with in order to comment out an entire line in C, normally for debugging purposes and whatnot. I ...
0
votes
1answer
1k views

Why i can't run idle in python, while i am connected through putty

here is the the text it shows when I try to run idle: Traceback (most recent call last): File "/opt/epd/bin/idle", line 5, in <module> main() File ...
0
votes
2answers
143 views

wake computer up when IP is pinged

i want to wake my computer using WoL or a "VTL"(Virtual Tripline). but, because i am on a router with other devices, i cannot use WoL. Then I looked for a Virtual Tripline on google - no results that ...
0
votes
3answers
69 views

Extra file with Same Name Created Automatically while writing a program in unix

Some time while writing a program for example convert.c a file with same name followed by tiled(~) convert.c~ gets created in same directory. why is this so and whats really happening .please explain ...
0
votes
1answer
305 views

Does Windows 7 XP mode support the Turbo C compiler? [closed]

Does XP mode in Windows 7 support the Turbo C compiler?
0
votes
1answer
54 views

How can I have some snapshots of my program? [duplicate]

Possible Duplicate: Screenshot utilities for Windows I have made a program and to make its report I need some snapshots.I found out that the printscreen button does not work in this ...
0
votes
1answer
26 views

A Linux Distribution w/ Version which contains Sendmail version 8.6.9

I'm looking for Sendmail version 8.6.9. What distribution (I don't think that matters) or version of said distribution contains the old 8.6.9 version of sendmail. If I'm going about getting that ...
0
votes
1answer
62 views

How to prevent GNU indent from breaking initialization assignment like “= { 0 };”

See following example. $ indent --version GNU indent 2.2.10 $ cat foo.c void foo() { struct { int a; int b; } v = { 0 }; } $ indent -st foo.c void foo () { struct { ...
0
votes
1answer
230 views

How to delete a particular line in a text file after some operation on that text file at the same time

I am perl bginner (but i guess logic is same for all programming languages like C++ and C in my case its perl). What i want to achieve ? I have a text file i read that file which contains different ...
0
votes
1answer
628 views

Windows : How to protect process from getting killed in C/C++ [closed]

Is there any "GODLY" method through which i can protect my process from getting killed either from: 1>Task manager 2>Command prompt -- forcefully kill Things i tried : 1. Hooking Open Process and ...
0
votes
2answers
3k views

Issues installing linux drivers from makefile

Since this was more of a software/driver issue I posted the question on SuperUser rather than EE Exchange. I searched around on the net a bit and found a very useful USART to USB converter bridge. ...
0
votes
1answer
104 views

Should I use Python or C for a language interpreter? [closed]

I'm planning on writing a language interpreter for a custom language of mine. The language will work similarly to PHP in that it will be run off of a web server and the code will be executed in the ...
0
votes
1answer
65 views

To run Makefile.tpl in OSX

I have the file here which syntax seems to be near normal make-file with parameter install. I run unsuccessfully make install I get make: *** No rule to make target `install'. Stop. I get the ...
0
votes
2answers
2k views

E138: Can't write viminfo file

I'm using ncurses to create a tui to move through directories. I have the program opening editable files in vi using a system call def_prog_mode(); endwin(); sprintf(command, "%s %s", ...
0
votes
1answer
73 views

Fedora 17 LXDE missing man 2 and man 3 C functions

everyone. I am using Fedora 17, and I need to refer to some C functions, but man 2 malloc or man 3 malloc ( malloc for example ) are not working. Also man (function) is not working too. Any clues? I ...
0
votes
4answers
974 views

How to set the time temporarily in Linux

I am testing some code with some random numbers generated with the current time as the seed using srand(time(0)) I'd like to get the same random numbers every time when I run it. So I want to set ...
0
votes
2answers
56 views

GNU Emacs is crashing with -nw

When I run emacs with -nw option, the emacs really open, but I can't do more nothing. As if the user input is blocked and no keyboard signal is received and/or interpreted. I've tried run without load ...
0
votes
1answer
259 views

C program output file gnome-terminal

I have created a C program and made an executable under Linux. Right now, I open the executable by going first to gnome-terminal and then type ./<filename> I want to create a shortcut icon ...
0
votes
1answer
351 views

Mingw Shell Console Issue

I recently installed MingW/Msys on my XP Pro box (SP 3). When I attempt to open a Mingw shell as a console it behaves incorrectly. The shell window opens for perhaps 5 seconds and then the window ...
0
votes
2answers
1k views

Make Tor use Unique IP for each instance open

How can I get Tor to use a unique IP for each instance of Tor open in C++, Python or Perl? Is there a command to force it to use a unique IP that I can just call using subprocess? *cheers
0
votes
3answers
59 views

Using Connection of one PC on another [closed]

I have two linux PC and connected through LAN cable.First PC having internet connection but second does not.I want second PC to use the connection of first PC through a C program. I am new to network ...
0
votes
2answers
67 views

Adding trec format tags to thousands of file

I need to add tags like text of file in thousand of files in a directory and I tried it using cat and outputing it to a stream of file using for file in * do cat ../gau > temp; //gau contain ...
0
votes
1answer
69 views

How can I locate the header + object file of cksum in Mac OS X

I'm trying to locate the header + object file of cksum in Mac OS X, but with no lack. Any suggestions?
0
votes
1answer
357 views

Vim bind compile key depending on document type

Is there a way to bind a key by document type? For example, if the document is a .tex file, I want f5 to call PdfLatex, but it is a .c file, I want it to call make
0
votes
1answer
351 views

Program parameters for anjuta

I have recently installed Anjuta. I don't know what parameters should be passed in order to run the program after clicking on Run -> Execute.
0
votes
2answers
476 views

Installing windows and unix on two hard drives on the same computer

I know this might be a noob question, but I need to install windows and a Unix system on the same machine. I've got two hard drives, so I can install one on each. Just not sure if maybe I would be ...
0
votes
0answers
18 views

Where can I get Unicast, Multicast, Broadcast and Discard Packets Sent and Received via a particular interface in Unix systems?

I have created several interfaces on my Unix machine for communication to the external world. Now I need to get the count of various packets Sent and Received via each interface. I have already ...
0
votes
1answer
26 views

Unknown option -pthread in LD

This is a follow up from this issue on Github. Basically, on OS X El Capitan, I get this message: ld: unknown option: -pthread clang: error: linker command failed with exit code 1 (use -v to see ...
0
votes
1answer
19 views

libcurl version 7.21 to work on Redhat 6

I am having an issue with libcurl version 7.19 and socks proxy on redhat 6. I believe it was fixed in libcurl version 7.21 how do i upgrade libcurl on redhat 6 to 7.21 or greater?
0
votes
0answers
47 views

Clion formatting code differently (comments aligned in a column)

Question is about Clion. I don't have enough reputation to put the tag in the question's tags. I have 2 things I need, in order to format code in a different way in Clion, and I can't figure out how ...
0
votes
0answers
35 views

prevent asl message to show up on /var/log/system.log

I'd like to define new asl facility in my project, and use it to generate asl log messages that wouldn't show up in /var/log/system.log (but only in the my pre-defined log file) here's my entire asl ...
0
votes
2answers
41 views

Can I sandbox a binary created in C (with GCC) for Linux and make it easy for users?

I have compiled a binary that I want to distribute to other people. It's closed-source, but I want to provide users of the binary with confidence that it cannot possibly access the internet, ...
0
votes
0answers
28 views

pnmtopng on large file

I am running pnmtopng on a 101M, 3000x4000 pixel PNM file. I get the error pnmtopng: ASCII decimal integer in file is too large to be processed. every time I run it. I looked through the source and it ...
0
votes
0answers
34 views

Why do these benchmarks NOT saturate the CPU.

I ran two trivial benchmarks in Powershell and C. I ran this on reasonably well endowed i7-2600 with 16 Gig Win 7 Pro. Both ran using two of the 8 cores (really 4 cores dual hyper threaded) and ran ...
0
votes
0answers
33 views

Building software on Arch and finding the dependency

I'm relatively new to compiling software. I downloaded a package called gr-scan which uses gnuradio and osmosdr (I have both installed and working via pacman already). The instructions say to edit the ...
0
votes
1answer
44 views

How can I add a flag in PostgreSQL source code that works in both frontend and backend?

I'm trying to do some changes to postgresql source code. I want to add a flag that works in both frontend and backend. Here is what I have done so far. 1- I created my header file mine.h in which I ...