Search Results

Search: Posts Made By: niterobin
Forum: Programming 10-15-2013
4,463
Posted By jim mcnamara
Sounds like it stopped after it ran libtool with...
Sounds like it stopped after it ran libtool with --mode=compile mode. See if you can run libtool again with --mode=link to produce .a and .so libraries.

libtool is a wrapper for gcc, ln, ar, and...
Forum: Programming 10-06-2013
3,563
Posted By Don Cragun
If you have a C programming environment that...
If you have a C programming environment that conforms to the 1999 C standard, you should include the stdbool header:
#include <stdbool.h>before using bool, true, and false in your program. If you...
4,455
Posted By bakunin
OK, here is a short introduction to make and...
OK, here is a short introduction to make and makefiles:

Compiling, linking and running programs is a quite repetitive task: every change in any program file will make it necessary to recompile,...
Forum: Programming 03-12-2013
2,906
Posted By DGPickett
Some CPUs come pretty close to providing libc...
Some CPUs come pretty close to providing libc funtions, so a call and stack pushes are an undesirable overhead, while others need considerable code to do it, which can be had as a call, or optionally...
Forum: Programming 03-12-2013
2,906
Posted By Corona688
It's not a real function. g++ and many other...
It's not a real function. g++ and many other compilers will inline these functions -- add a few instructions in the program itself, rather than doing an entire branch/return for a function. Since a...
Forum: Programming 12-10-2012
3,720
Posted By Corona688
%i and %d mean integer, float or double would be...
%i and %d mean integer, float or double would be %f.

I usually use this code:

#include <sys/time.h>
#include <sys/types.h>
#include <stdio.h>

/* returns a timestamp in microseconds */...
Forum: Programming 11-23-2012
2,062
Posted By expl
You need to do two things: 1. set tty to raw...
You need to do two things:

1. set tty to raw mode otherwise it will buffer input and you will not be able to catch key events unless tty flushes the buffer (after pressing return by default)
2....
Forum: Programming 03-20-2012
9,876
Posted By Corona688
What do you mean by 'parametrized memory'? ...
What do you mean by 'parametrized memory'?

Really short way: int rnd=open("/dev/urandom", O_RDONLY);
read(rnd, memory, bytes);
close(rnd);
Forum: Programming 03-20-2012
9,876
Posted By Corona688
You can feed any number you want into that read...
You can feed any number you want into that read there.

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>

int main(int argc, char *argv[])
{
int w,h;
...
Forum: Programming 01-18-2011
2,790
Posted By Corona688
main's location is probably a coincidence from...
main's location is probably a coincidence from main being the first(or maybe even only?) function in your code. It doesn't need to be at anywhere in particular.

There is a tiny bit of code that's...
Forum: Programming 10-26-2010
12,545
Posted By fpmurphy
That version of LDD is out-of-date. Many of the...
That version of LDD is out-of-date. Many of the examples do not work on the 2.6.* kernel. LDD 3rd edition is available online here (http://lwn.net/Kernel/LDD3).
Forum: Programming 10-01-2010
10,282
Posted By Corona688
You can't do this with getchar(), you'll have to...
You can't do this with getchar(), you'll have to use read() instead. More details in a bit.

---------- Post updated at 03:31 PM ---------- Previous update was at 03:19 PM ----------

This...
9,431
Posted By methyl
Hex 0D0A is two characters : Carriage Return and...
Hex 0D0A is two characters : Carriage Return and Line Feed .
This is the Microsoft MSDOS line terminator for text files.

The unix terminator for text files is just Line Feed (Hex 0A).

If you...
Forum: Tips and Tutorials 01-31-2007
9,542
Posted By tayyabq8
Linux Filesystem Hierarchy
Hi,

Please have a look this: http://tldp.org/LDP/Linux-Filesystem-Hierarchy/Linux-Filesystem-Hierarchy.pdf

I think this can be very useful for a beginner/intermediate level user to understand...
Forum: Programming 10-17-2004
7,760
Posted By cbkihong
The program is not linked to the math library....
The program is not linked to the math library. #include just makes those symbols available for compilation but not linking.

Include "-lm" to the command line.
Showing results 1 to 15 of 15

 
All times are GMT -4. The time now is 05:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy