GCC errors: unrecognized option '--as-needed'

This is a discussion on GCC errors: unrecognized option '--as-needed' within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Hi, I am getting the following error when I try to compile a simple 'hello world' program. : /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld: unrecognized ...

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    205

    GCC errors: unrecognized option '--as-needed'

    Hi,
    I am getting the following error when I try to compile a simple 'hello world' program. :
    /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld: unrecognized option '--as-needed'
    It's looking for the assembler program but for some reason can't find it and I don't know where to look for it. What happened was that I upgraded GCC from 3.2 to 3.3.4. GCC was working fine before but now it gives me this error. Can anybody help me fix this?
    Amish

  2. #2
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    What commandline options did you specify?
    Monday - what a way to spend a seventh of your life

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    205
    No command line arguments.

  4. #4
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    Quote Originally Posted by axr0284
    No command line arguments.
    so you're just typing gcc at the command line

    try gcc -o programName inputfile.c
    Monday - what a way to spend a seventh of your life

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  2. global namespace errors
    By stubaan in forum C++ Programming
    Replies: 9
    Last Post: 04-02-2008, 03:11 PM
  3. segfault with gcc, but not with TC
    By koodoo in forum C Programming
    Replies: 15
    Last Post: 04-23-2007, 09:08 AM
  4. gcc configuration under linux advice needed
    By vart in forum Tech Board
    Replies: 9
    Last Post: 01-10-2007, 01:46 PM
  5. Problems about gcc installation
    By kevin_cat in forum Linux Programming
    Replies: 4
    Last Post: 08-09-2005, 09:05 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21