Posted on April 28th, 2008 by linux
Here is a perl script example how to create temporary directory on the file system:
#!/usr/bin/perl
use File::Temp qw/ tempdir /;
my $perl_temporary_directory = tempdir();
Filed under: Linux, Perl, Programming | No Comments »
Posted on April 27th, 2008 by linux
install gcc compiler:
apt-get install gcc
All following steps are done in the same directory !! NO need to have an root permissions.
create library1 and save it as liblibrary_1.c:
#include
void library_1(char *val)
{
printf(”Passed value to library_1: %s\n”, val);
}
create library2 and save it as liblibrary_2.c:
#include
void library_2(char *val)
{
printf(”Passed value to library_2: %s\n”, val);
}
Compile both c libraries source codes:
gcc -c liblibrary_1.c liblibrary_2.c
NOTE: [...]
Filed under: C, Linux, Linux Programming Tutorial, Programming | No Comments »
Posted on April 27th, 2008 by linux
Here is how you can create linux hello world program. First make sure that you have gcc ( c programming language compiler ) package installed. On debian or on ubuntu you would do:
apt-get install gcc
save this code as linux_program_hello.c
#include
#include
int main()
{
printf(”My First Linux Program - Hello World\n”);
exit(0);
}
now its compile time:
gcc -o linux_program_hello linux_program_hello.c
run your first c [...]
Filed under: C, Linux, Linux Programming Tutorial, Programming | No Comments »