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 »
Posted on April 17th, 2008 by linux
Following error message can appear during vmware installation due to incompatible kernel version and vmware installation package:
/tmp/vmware-config0/vmmon-only/./include/compat_wait.h:60: error: conflicting types for ‘poll_initwait’
include/linux/poll.h:65: error: previous declaration of ‘poll_initwait’ was here
/tmp/vmware-config0/vmmon-only/linux/driver.c:198: warning: initialisation from incompatible pointer type
make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic’
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/vmmon-only’
Unable to build [...]
Filed under: Administration, Linux, vmware | No Comments »