انجمنهای فارسی اوبونتو
کمک و پشتیبانی => راهنماها، نکات و ترفندها => نویسنده: محمدرضا دولتی در 21 امرداد 1389، 07:16 بظ
-
سلام
من یه فایل C دارم تو linux کامپایل نمیشه از دستور زیر استفاده میکنم ولی error میگیره فکر کنم به خاطر Library ها باشه لطفا راهنمایی کنید
ممنوم
gcc filename.c -o newname
-
خب چه errorی میده؟
-
خب چه errorی میده؟
root@mohammad-desktop:~# gcc farzadho.c -o mm
farzadho.c:1:3: error: invalid preprocessing directive #Author
farzadho.c:2:3: error: invalid preprocessing directive #Version
farzadho.c:3:3: error: invalid preprocessing directive #Tested
farzadho.c:4:3: error: invalid preprocessing directive #Greetz
farzadho.c:5:3: error: invalid preprocessing directive #Code
farzadho.c:5:29: warning: missing terminating ' character
farzadho.c:18:22: error: asm/page.h: No such file or directory
farzadho.c: In function ‘main’:
farzadho.c:199: error: ‘PAGE_SIZE’ undeclared (first use in this function)
farzadho.c:199: error: (Each undeclared identifier is reported only once
farzadho.c:199: error: for each function it appears in.)
farzadho.c:209: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 2 has type ‘char *’
farzadho.c:209: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 3 has type ‘char *’
farzadho.c:210: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 2 has type ‘struct page *’
farzadho.c:211: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 2 has type ‘struct page *’
farzadho.c:229: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 2 has type ‘char *’
farzadho.c:229: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 3 has type ‘char *’
farzadho.c:230: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 2 has type ‘struct page *’
farzadho.c:231: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 2 has type ‘struct page *’
farzadho.c:246: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 2 has type ‘char *’
farzadho.c:246: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 3 has type ‘char *’
farzadho.c:247: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 2 has type ‘struct page *’
farzadho.c:257: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 2 has type ‘char *’
farzadho.c:257: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 3 has type ‘char *’
اینم خود فایله یه تست بکنید برای کامپایل:
http://dolati1703.persiangig.com/farzadho.c
-
چند تا پست میزنی واسه یه سوال؟؟ تو اون قبلی جوابتو دادم.