إعـــــــلان

تقليص
لا يوجد إعلان حتى الآن.

مساعدة في عمل كومبايل ل c

تقليص
X
 
  • تصفية - فلترة
  • الوقت
  • عرض
إلغاء تحديد الكل
مشاركات جديدة

  • مساعدة في عمل كومبايل ل c

    أناوحاولت على اللينوكس ubuntu 7.10 gusty

    gcc file file.c

    وجربت

    gcc -o file.c

    و

    gcc file.c

    لكن يطلع كلام طويل بعض المرات في الاخير خطأ error او يقول no input directory او كلام مشابه

    المهم بحثت في قوقول يقولي انه الناتج للملف يكون a.out بعدين اسوي له
    ./a.out هذا معكوس خخخ لانه بالعربي المنتدى

    يمكن السورس في اخطأ لكن انا جربت على عدت سورسات العاب وبرامج لكن كلهم فيهم مشاكل

    ارجو المساعدة>>> او الي يعرف اي شي او تلميح يمكن يفيدني يتفضل
    Raspbian on raspberry pi 3

  • #2
    جرب
    كود:
    gcc ./file.c
    g++ ./file.cpp
    و سيكون الملف التنفيذى a.out لتشغيله
    كود:
    ./a.out

    تعليق


    • #3
      gcc filename -o OUTFILE
      ياريت تعرض رسالة الإيرور كاملة

      ملحوظة: على ماأذكر انك المفروض تحمل build-essential مع Ubuntu
      Programming-Fr34ks[dot]NET
      Ma Weblog
      ابدأ بتعلم Python | Ruby
      كتاب البايثون متوافر الآن
      لا اتواجد بهذا المنتدى ... للإتصال

      تعليق


      • #4
        جربت الامر
        gcc ./file.c ايضا gcc file.c

        والنتيجة هي كالاتي
        كود PHP:
        ubuntu@U-PC:~/Desktopgcc button.c
        button
        .c:13:21errorgraphics.hNo such file or directory
        button
        .c:16:18errorconio.hNo such file or directory
        button
        .c:17:16errordos.hNo such file or directory
        button
        .c:21warningbuilt-in function ‘y1’ declared as non-function
        button.cIn function ‘main’:
        button.c:29error‘LIGHTRED’ undeclared (first use in this function)
        button.c:29error: (Each undeclared identifier is reported only once
        button
        .c:29error: for each function it appears in.)
        button.c:30error‘TRIPLEX_FONT’ undeclared (first use in this function)
        button.c:30error‘HORIZ_DIR’ undeclared (first use in this function)
        button.c:34error‘DEFAULT_FONT’ undeclared (first use in this function)
        button.c:42error‘YELLOW’ undeclared (first use in this function)
        button.c:56errortoo many arguments to function ‘random’
        button
        .c:57errortoo many arguments to function ‘random’
        button
        .c:25warning: return type of ‘main’ is not ‘int’
        button
        .cIn function ‘unpressed’:
        button.c:103error‘SOLID_FILL’ undeclared (first use in this function)
        button.c:103error‘CYAN’ undeclared (first use in this function)
        button.c:105error‘LIGHTCYAN’ undeclared (first use in this function)
        button.c:109error‘EGA_DARKGRAY’ undeclared (first use in this function)
        button.c:114error‘BLUE’ undeclared (first use in this function)
        button.cIn function ‘pressed’:
        button.c:123error‘SOLID_FILL’ undeclared (first use in this function)
        button.c:123error‘CYAN’ undeclared (first use in this function)
        button.c:125error‘EGA_DARKGRAY’ undeclared (first use in this function)
        button.c:131error‘LIGHTCYAN’ undeclared (first use in this function)
        button.c:137error‘DOTTED_LINE’ undeclared (first use in this function)
        button.c:137error‘NORM_WIDTH’ undeclared (first use in this function)
        button.c:140error‘BLUE’ undeclared (first use in this function)
        button.cIn function ‘erasebutton’:
        button.c:150error‘SOLID_FILL’ undeclared (first use in this function)
        button.cIn function ‘showmouseptr’:
        button.c:161errorinvalid use of undefined type ‘union REGS’
        button
        .cIn function ‘hidemouseptr’:
        button.c:168errorinvalid use of undefined type ‘union REGS’
        button
        .cIn function ‘getmousepos’:
        button.c:178errorinvalid use of undefined type ‘union REGS’
        button
        .c:182errorinvalid use of undefined type ‘union REGS’
        button
        .c:184errorinvalid use of undefined type ‘union REGS’
        button
        .c:186errorinvalid use of undefined type ‘union REGS’ 
        اما طريقة strikerX
        يظهر لي نفس الخطأ الي فوق ايضا

        انا عندي سورس باسم button.c
        وهي لعبة ورفعتها في المرفقات وموجود معاها button.exe تشتغل على الوندوز بالاضافة للسورس وreadme

        ياليت احد يجرب يسوي compile
        الملفات المرفقة
        Raspbian on raspberry pi 3

        تعليق


        • #5
          button.c:13:21: error: graphics.h: No such file or directory
          button.c:16:18: error: conio.h: No such file or directory
          button.c:17:16: error: dos.h: No such file or directory
          كل هذه مكتبات غير قياسية
          بل أكاد أجزم أنها لا تعمل حتى في ويندوز

          إنها من عصر بورلاند على الدوس
          يرحم

          تعليق


          • #6
            [
            QUOTE]إنها من عصر بورلاند على الدوس
            ههههه عصر بور ﻻند اعتقد انه المشكلة في السورس ﻻني عملت كومبايل اخيرا ﻻ سهل برنامج
            hello world
            وبرنامج اخر

            واكتشفت انه gcc او cc يؤدي الغرض

            كود PHP:
            #include <stdio.h>

            int main()

            {

                
            printf("Hello World\n");

                return 
            0;


            بعدها طلع الناتج a.out وشغلت الرسالة Hello World

            شكرا لمروركم ومحاولة المساعدة
            Raspbian on raspberry pi 3

            تعليق


            • #7
              أغلب المكتبات التي ذكرت في برنامجك تستعمل تعمل تحت Win فقط .
              http://0xsife.wordpress.com
              المجلة التقنية It-scoop.com

              أخبار التقنية أولا بأول لحظة وقوعها

              تعليق

              يعمل...
              X