Linux GCC makeÎļþµÄд·¨2
ÎļþÔÚÁ½¸öÎļþ¼Ð£º
inc/hello.h
main/hello.c, main.c, Makefile
ÎļþÄÚÈÝ£º
hello.h
void hello(char name[]);
hello.c
#include <stdio.h>
void hello(char name[])
{
printf("Hello %s!\n", name);
}
main.c
#include <stdio.h>
#include "../inc/hello.h"
// The second
int main()
{
hello("GCC");
printf("Haha Linux Ubuntu!\n");
return 0;
}
Makefile
# String declaration
objects = main.o hello.o
# Command
app : $(objects)
cc -o app $(objects)
main.o : main.c hello.h
cc -c main.c
hello.o : hello.c stdio.h
cc -c hello.c
# Search paths
vpath %.h /usr/include ../inc
# Clean the intermediate files
.PHONY : clean
clean :
rm app $(objects)
Ïà¹ØÎĵµ£º
Ö÷Òª¿´ÁËLinuxÍêȫעÊÍÄDZ¾Ê飬ÖÕÓÚ×¼±¸¹¥¶ÁLinuxÄÚºËÔ´ÂëÁË£¬ÏÈ¿´Á˵ڶþÕŵÄ×ÜÌå¸ÅÄ¸Ð¾õ²Ù×÷ϵͳÓкܶණÎ÷»¹ÕæÊÇ´óͬСÒ죬¼ÇµÃucos¾ÍÊÇÓÐÒ»¸ö½Ð×ö¿ì±íµÄ¶«Î÷£¬ÀïÃæ×î¶à¿ÉÒÔ±íʾ64¸ö½ø³Ì£¬¶øÔç°æµÄLinux£¨0.11£©Ò²ÓÐÕâ¸öһ˵µÄ¶«Î÷¡£
ÔÚLinuxÖÐÒ²ÓÐÒ»¸öPCBÀ´±íʾÿ¸ö½ø³Ì£¬ÔÚÕâ¸ö½á¹¹ÌåÖУ¬ÓÐÖ¸ÏòÈÎÎñ´úÂëµÄÖ ......
ÔÚ¸÷ÖÖLinux·Ö·¢°æÖУ¬´ó¶àÊý¶¼ÒѾĬÈϼ¯³ÉÁËsnmpd£¬±ÈÈçÔÚsuse10ÖУ¬Äã¿ÉÒÔÕâÑù¿ªÆôsnmpd£º
¡¡¡¡
¡¡¡¡suse10:~ # /etc/init.d/snmpd start
¡¡¡¡
¡¡¡¡Èç¹ûûÓÐĬÈϰ²×°£¬ÄãÒª×öµÄ¾ÍÊÇ×Ô¼ºÀ´±àÒësnmpd£¬°´ÕÕϱߵIJ½Ö裬·Ç³£¼òµ¥¡£
¡¡¡¡
¡¡¡¡±àÒëºÍ°²×°
¡¡¡¡¶ÔÓÚLinuxƽ̨£¬ÎÒÃÇÍÆ¼öʹÓÃNet-SNMP£¬ËüʵÏÖÁ˱ê×¼µÄSNM ......
1. download & setup jdk
2. download eclipse and test a simple example of java
3. setup mysql use yum(or download & setup by hand)
yum install mysql
problem1:linux mysql configuration & use
solution1:
mysql -uroot -p
passw ......
·¢ÏÖ·þÎñÆ÷ϵͳʱ¼äºÍ±ê׼ʱ¼ä²îÁË10¶à·ÖÖÓ,È»ºóÁãµãµÄʱ¼äµ÷ÕûÁËÏÂʱ¼ä¡£¹ýÁ˲¶àÒ»¸öÀñ°Ý·¢Õ¹Êý¾Ý¿âÖмǼµÄʱ¼ä»¹ÊDz»¶Ô£¬ÈçÊÇÓüӰàµ÷ÕûÁËÏÂʱ¼ä¡£¹ýÁË2ÌìÒ»¿´»¹ÊÇʱ¼ä²»¶Ô£¬Ò»²é²Å·¢ÏÖ£º
»úÆ÷ÀïÓÐÁ½¸öʱÖÓ¡£Ó²¼þʱÖÓ´Ó¸ù±¾ÉϽ²ÊÇCMOSʱÖÓ£»¶øÏµÍ³Ê±ÖÓÊÇÓÉÄÚºËά»¤µÄ£¬ËüÊÇ´Ó1969ÄêÄ©£¨¼ ......
ËùÐèÎļþhello.c, main.c, hello.h, Makefile£¬ÔÚͬһ¸öĿ¼ÏÂ
hello.c:
#include <stdio.h>
void hello(char name[])
{
printf("Hello %s!\n", name);
}
main.c:
#include "stdio.h"
#include "hello.h"
// The second
int main()
{
hello("GCC");
printf("Haha Linux Ubuntu!\n");
......