Find the answer to your Linux question:
Results 1 to 5 of 5
Can someone please tell me w<hat do I need to compile a c program? I installed libs, devel, headers, still getting this error.. What am I missing? please help. No ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2005
    Posts
    1

    what is needed to compile c?


    Can someone please tell me w<hat do I need to compile a c program?

    I installed libs, devel, headers, still getting this error..
    What am I missing? please help.

    No matter what I try to compile, I getting this one:

    peter@anna:/home/peter/Desktop/appletouch-0.08# make
    make -C /lib/modules/2.6.12-9-powerpc/build SUBDIRS=/home/peter/Desktop/appletouch-0.08 modules
    make: *** /lib/modules/2.6.12-9-powerpc/build: No such file or directory. Stop.
    make: *** [default] Error 2

  2. #2
    Linux Engineer
    Join Date
    Nov 2004
    Location
    home
    Posts
    796

    Re: what is needed to compile c?

    Quote Originally Posted by anono
    peter@anna:/home/peter/Desktop/appletouch-0.08# make
    make -C /lib/modules/2.6.12-9-powerpc/build SUBDIRS=/home/peter/Desktop/appletouch-0.08 modules
    make: *** /lib/modules/2.6.12-9-powerpc/build: No such file or directory. Stop.
    make: *** [default] Error 2
    Perhaps you should read the error? It states that the directory you are trying to build in doesn't exist...

  3. #3
    Linux Newbie
    Join Date
    Mar 2005
    Location
    Romania
    Posts
    186
    To compile a C program use GCC:
    Code:
    gcc <file>
    The output file will be the file 'a.out'. If you want to specify a different output file do
    Code:
    gcc -o <output_file> <file>
    To run the program just do
    Code:
    ./<output_file>
    For more infomation on GCC
    Code:
    man gcc
    You can only be young once. But you can always be immature.

  4. #4
    Linux Enthusiast
    Join Date
    Aug 2005
    Location
    Hell
    Posts
    514
    It seems like you are trying to compile a kernel driver and you don't have the kernel headers for your kernel. Try installing the kernel headers. If you tell us your distro, we can give you more specific instructions.

  5. #5
    Linux Newbie
    Join Date
    Mar 2005
    Location
    Romania
    Posts
    186
    Umm, yeah, tell us what is it that you are trying to do? Are you trying to
    Code:
    configure
    make
    make install
    a file or do you need a C compiler for your programs?
    You can only be young once. But you can always be immature.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •