Find the answer to your Linux question:
Results 1 to 3 of 3
Hi All, Good Mrng Everybody. I am Vineela. I am here with few queries: I am using Green Hills C Compiler, Cygwin to build a project in Linux. PC is ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    1

    cannot find -lc

    Hi All,
    Good Mrng Everybody. I am Vineela.
    I am here with few queries:
    I am using Green Hills C Compiler, Cygwin to build a project in Linux.
    PC is windows XP.
    Green Hills C compiler which we r using is windows based which can support LINUX os.
    When i build a project (a simple hello program), the following error message occurs

    "Linking hello because it does not exist
    /cygdrive/c/linux_build_dir/bin/ld: skipping incompatible C:\linux_build_dir\lib/libc.so when searching for -lc
    /cygdrive/c/linux_build_dir/bin/ld: skipping incompatible C:\linux_build_dir\lib/libc.a when searching for -lc

    /cygdrive/c/linux_build_dir/bin/ld: cannot find -lc

    Error: build failed
    Build failed

    Please help me to solve this issue.

    Thanks & Regards,
    Vineela

  2. #2
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    Well on a proper system (not Windows!) you'll have a C runtime library, which is what the -lc directive is specifying. It should be trying find a library called libc.a or libc.so in /usr/lib or /lib.

    However, the fact that ld is reporting that it can't find -lc it may not be interpreting the flag properly.

    I've always found Cygwin to be lacking at extremes of usage - for the most part it's a reasonable implementation but then you stumble over a glaring lack.

  3. #3
    Just Joined!
    Join Date
    Apr 2008
    Posts
    2
    .so file is a library for linux (same as .dll in windows) and it is compatible in linux only.
    if u want to run inside the cygwin,the extension for the file must be in .dll as it is base on the windows environment

Posting Permissions

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