File: USE

package info (click to toggle)
libhdate 1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,036 kB
  • sloc: sh: 11,579; ansic: 5,117; pascal: 928; makefile: 249; sed: 16; cpp: 13; python: 7; perl: 5; php: 5; ruby: 5
file content (58 lines) | stat: -rw-r--r-- 979 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
libhdate USE file

CONTENTS
========
1] Usage, if you have pkg-config
2] Usage, if you don't have pkg-config
3] An expanded example
3.1] Small sample source code
3.2] Compile it
3.3] Execute it


1] Usage, if you have pkg-config
================================
gcc -c `pkg-config --cflags libhdate` <your code>.c 
gcc `pkg-config --libs libhdate` <your code>.o -o <program name>


2] Usage, if you don't have pkg-config
======================================
gcc -c <your code>.c 
gcc -lm -lhdate <your code>.o -o <program name>

  
3] An expanded example
======================


3.1] Small sample source code
=============================
// example code: file: test.c
#include <stdio.h>
#include <hdate.h>

#define TRUE  1
#define FALSE 0

int
main()
{
	hdate_struct	*h;	

	h = hdate_hdate( 0,0,0);
	
	printf ("%s\n", hdate_get_format_date (h, FALSE) );
	
	return 0;
}


3.2] Compile it
===============
gcc -lm -lhdate test.c -o test


3.3] Execute it
===============
./test