+ Reply to Thread
Results 1 to 5 of 5

Thread: C compiling on Unix

  1. #1
    kamshj
    Guest

    C compiling on Unix

    Hi



    I'm trying to compile a C program on Unix, but when I run in shell the makefile (command make) it gives these errors:

    stdio.h: No such file or directory

    stdlib.h: No such file or directory

    math.h: No such file or directory

    time.h: No such file or directory

    X11/Xlib.h: No such file or directory

    X11/Xutil.h: No such file or directory



    In program's Readme file it says just to run the makefile and it will compile.



    Is it my host missing some files or something I do wrong?



    Thanks for advising!
    More Information:
    1. The GCC C compiler is available for most of the UNIX-like platforms and as the Devel/gcc package from the Cygwin setup
    2. Introduction General Compilers for UNIX platforms Compiling Linking Library files How to link to library files Libraries outside of path Static
    3. In most cases, performing the following three steps is all that is needed to successfully compile a Unix-based application on Mac OS X after you have unpacked
    4. In 1969, the first version of Unix climbed out of the primordial swamp at the AT&T labs, having self-assembled itself from PDP-7 assembler
    5. This tells the compiler to run the preprocessor on the file foo

    More:


  2. #2
    plh8668
    Guest

    Without knowing more, two issues come to mind.



    Make sure the paths in the makefile are correct and that you have enough authority on the computer to compile programs. Remember, Linux imposes roles on users and you may need to be root to make this work. And, not all distros use the same path scheme.
    More Information:
    1. It is a full c/c++ compiler that can be told to do ansi only on the command line
    2. PGI C/C++ Workstation includes The Portland Group's native parallelizing/optimizing OpenMP C++ and ANSI C compilers
    3. Richard Stallman announced in September 1983 the plan to develop a free software Unix-like operating system called GNU
    4. David has worked with Unix platforms for over fifteen years, developing Open Source software on AIX, Linux, BSD, Solaris, and Ultrix
    5. We will start with the GNU C Compiler gcc and GNU C++ Compiler g++
    6. Any software project trying to use the version 7 C compiler will have the problems described above!
    7. Finding the compiler version in your Unix system should be the first step before you attempt to compile any package from its source codes
    8. 0 was released in 1987, and the compiler was extended to compile C++ in
    9. File Format: Microsoft Powerpoint - View as HTMLBefore using the C/C++ Compiler on redwood, you must first load the appropriate Intel compiler module
    10. Que - Can you guys tell me how can i find C compiler in my S/W or if i need to install any s/w then pls give me link ASAP

  3. #3
    dngthanh
    Guest

    siraxi, you probably don't have the files on your computer (they are usually located in /usr/include).

    Read here for details: http://www.linux.com/howtos/Glibc2-HOWTO.shtml
    More Information:
    1. C Compiler Free Download GCC Code Coverage Linux Performance Tool - Intel C++ Compiler for Linux
    2. The following is a list of commands to know to be able to use the compiler
    3. On Linux systems, the GNU compiler is the default compiler, so gcc does the same as cc
    4. The default C-compiler on most systems will probably be called cc
    5. So, if our program source is in a file named 'single_main

  4. #4
    haiyanvn
    Guest


    Quote:








    Originally Posted by siraxi




    In program's Readme file it says just to run the makefile and it will compile.



    Is it my host missing some files or something I do wrong?



    run this command to see if you have the standard header files:


    Code:

    find / -name "stdio.h" 2>/dev/null

    If you don't find anything, you don't have them. If you locate them, note what directory they are in and then edit the makefile. Without seeing the makefile, I can't tell you where to add them. Most makefiles will have a variable called $(INCLUDES) or something similar. Add the path to that field.





    good luck.

    g
    More Information:
    1. gcc is a free C and C++ compiler from the Free Software Foundation available for many Unix-based systems
    2. SAS/C supports the compilation and execution of applications that run under OS/390 Unix System Services
    3. One kind creates an object file by compiling a C source code file
    4. Although the command to perform this task is simply cc
    5. c and then compile it into the object code file foo
    6. Resulting binaries do not run on a 32-bit x86 system, but can be run using elksemu
    7. c" but the unix shell tell me : cc: Command not found
    8. This documentation is mainly focused around the process of compiling and configuring PHP

+ Reply to Thread

Similar Threads

  1. Favorite Unix Hosts
    Do any of you guys have a favorite UNIX Host?
  2. C99 ERROR (Unix and C)
    I'm not sure which build option will help me solve this problem. Initializations in for loops causes this error when I try to run a c program on my...
  3. Help with compiling VB6
    I have Visual Studio.NET and I need to compile a vb6 script. I get errors when going to upgrade the code to vb.net. Is there any way to...
  4. Compiling and Running from the command prompt
    I spend all my time in IDEs, so I've actually forgotten how to compile from the command prompt. I have the JDK properly installed, so how exactly do...
  5. Preview site on Unix browser from PC
    I would like to find out if my site works on Unix machine browsers. Does any one know of a way to do this from my PC? I apologize is this has been...

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Automatic Translations (Powered by Powered by Google):
Afrikaans Albanian Arabic Belarusian Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Taiwanese Thai Turkish Ukrainian Vietnamese Welsh Yiddish