Results 1 to 6 of 6

Thread: Linker ld

  1. #1
    Join Date
    May 2013
    Beans
    39

    Linker ld

    I wrote a test file to check whether my gcc is correctly working or not .

    My file is just this thing

    test.c
    Code:
    #include<stdio.h>
    int main()
    {
    printf("THIS is a C-file\n");
    return 0;
    }
    When I try to compile the file, it shows the following error.


    Code:
    shraddesh@shraddesh-Samsung-Desktop-System:~$ vi test.c
    shraddesh@shraddesh-Samsung-Desktop-System:~$ gcc test.c
    /usr/bin/ld: this linker was not configured to use sysroots
    collect2: error: ld returned 1 exit status
    shraddesh@shraddesh-Samsung-Desktop-System:~$

    So please help me in solving this problem and make my gcc run properly ..
    Last edited by lisati; May 29th, 2013 at 01:00 PM. Reason: Added [code] and [/code] to aid readbility; removed other formatting

  2. #2
    Join Date
    Jun 2007
    Location
    Porirua, New Zealand
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Linker ld

    Thread moved to Programming Talk.
    Forum DOs and DON'Ts
    Never assume that information you find using a search engine is up-to-date.

  3. #3
    Join Date
    Nov 2005
    Location
    Bordeaux, France
    Beans
    11,297
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Linker ld

    How did you install gcc?
    「明後日の夕方には帰ってるからね。」


  4. #4
    Join Date
    May 2013
    Beans
    39

    Re: Linker ld

    I think the problem is not with gcc ...
    I installed gcc using synaptic package manger
    It worked for few hours after I installed.
    When I updated ld , binutils the above error cropped up .

  5. #5
    Join Date
    Nov 2005
    Location
    Bordeaux, France
    Beans
    11,297
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Linker ld

    Which packages exactly did you install? If you installed only the package gcc, try installing build-essential. Also, are you using third-party repositories?
    「明後日の夕方には帰ってるからね。」


  6. #6
    Join Date
    May 2013
    Beans
    39

    Re: Linker ld

    Solved it .. I completely uninstalled gcc , g++ and binutils and re-installed them using synaptic package manager.

    Now It's working

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
  •