collect2: ld returned 1 exit status

Discussion in 'C++' started by learning_C++, Sep 17, 2004.

  1. learning_C++

    learning_C++ Guest

    Hi,
    When i tried to compile my code, there is an error:
    collect2: ld returned 1 exit status
    what is the reason causing this error?

    Thanks,,
     
    learning_C++, Sep 17, 2004
    #1
    1. Advertising

  2. learning_C++ wrote:
    > When i tried to compile my code, there is an error:
    > collect2: ld returned 1 exit status
    > what is the reason causing this error?


    Try 'man ld'.
     
    Victor Bazarov, Sep 17, 2004
    #2
    1. Advertising

  3. learning_C++ wrote:
    > Hi,
    > When i tried to compile my code, there is an error:
    > collect2: ld returned 1 exit status
    > what is the reason causing this error?
    >
    > Thanks,,


    If you can post the entire error message, we can help. It could be
    that the library does not exist in the lookup path , you had given to
    the linker or the library name could be misspelt. Post the entire log to
    seek help.

    --
    Karthik.
     
    Karthik Kumar, Sep 17, 2004
    #3
  4. (learning_C++) wrote in message news:<>...
    > When i tried to compile my code, there is an error:
    > collect2: ld returned 1 exit status
    > what is the reason causing this error?


    Are you sure that is the only output you got? Normally you should have also
    gotten some other output that gives you the details of what went wrong.

    samuel
     
    Ron Samuel Klatchko, Sep 18, 2004
    #4
  5. learning_C++

    vineetgarg

    Joined:
    Jul 11, 2007
    Messages:
    1
    Getting same error while compiling mod_perl lib

    I am getting the same error while compliling the mod_perl lib
    plz help me out

    error trace is attached for the reference ::



    mod_perl.lo modperl_interp.lo modperl_tipool.lo modperl_log.lo modperl_c
    onfig.lo modperl_cmd.lo modperl_options.lo modperl_callback.lo modperl_handler.l
    o modperl_gtop.lo modperl_util.lo modperl_io.lo modperl_io_apache.lo modperl_fil
    ter.lo modperl_bucket.lo modperl_mgv.lo modperl_pcw.lo modperl_global.lo modperl
    _env.lo modperl_cgi.lo modperl_perl.lo modperl_perl_global.lo modperl_perl_pp.lo
    modperl_sys.lo modperl_module.lo modperl_svptr_table.lo modperl_const.lo modper
    l_constants.lo modperl_apache_compat.lo modperl_error.lo modperl_debug.lo modper
    l_common_util.lo modperl_common_log.lo modperl_hooks.lo modperl_directives.lo mo
    dperl_flags.lo modperl_xsinit.lo modperl_exports.lo \
    -s -L/usr/local/lib -s -s -L/usr/local/lib /usr/lib/perl5/5.8/cygwin/au
    to/DynaLoader/DynaLoader.a /usr/lib/perl5/5.8/cygwin/auto/Win32CORE/Win32CORE.a
    -L/usr/lib/perl5/5.8/cygwin/CORE -lperl -lcrypt -lgdbm_compat \
    -L/cygdrive/e/Projects/mod_perl-2.0.3/src/modules/perl -lhttpd2core -L/
    usr/lib -laprutil-1 -lgdbm -ldb-4.2 -lexpat -liconv -L/usr/lib -L/usr/lib -lapr
    -1 -lcrypt
    /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find
    -liconv
    collect2: ld returned 1 exit status
    make[1]: *** [mod_perl.so] Error 1
    make[1]: Leaving directory `/cygdrive/e/Projects/mod_perl-2.0.3/src/modules/perl
    '
    make: *** [modperl_lib] Error 2
     
    vineetgarg, Jul 11, 2007
    #5
  6. learning_C++

    rockyrakesh1331

    Joined:
    May 30, 2008
    Messages:
    1
    problems in compiling svn from source...

    i am quite a beginner and so my query may sound quite trivial to u guys but plz help me out with this

    the ./configure worked fine
    but while make i get :

    linux-awa5:~/Desktop/subversion-1.4.6 # make
    cd subversion/libsvn_subr && /bin/sh /root/Desktop/subversion-1.4.6/libtool --tag=CC --silent --mode=link gcc -g -O2 -pthread -L/usr/lib -rpath /usr/local/lib -o libsvn_subr-1.la auth.lo cmdline.lo compat.lo config.lo config_auth.lo config_file.lo config_win.lo constructors.lo ctype.lo date.lo dso.lo error.lo hash.lo io.lo kitchensink.lo lock.lo md5.lo nls.lo opt.lo path.lo pool.lo prompt.lo quoprint.lo simple_providers.lo sorts.lo ssl_client_cert_providers.lo ssl_client_cert_pw_providers.lo ssl_server_trust_providers.lo stream.lo subst.lo svn_base64.lo svn_string.lo target.lo time.lo user.lo username_providers.lo utf.lo utf_validate.lo validate.lo version.lo xml.lo /usr/lib/libaprutil-1.la -lldap -llber -ldb-4.5 -lexpat /usr/lib/libapr-1.la -lrt -lcrypt -lpthread -ldl -lz
    /usr/lib/gcc/i586-suse-linux/4.2.1/../../../../i586-suse-linux/bin/ld: cannot find -lldap
    collect2: ld returned 1 exit status
    make: *** [subversion/libsvn_subr/libsvn_subr-1.la] Error 1

    tell me what is this -lldap cud nt find man !!!
     
    rockyrakesh1331, May 30, 2008
    #6
  7. learning_C++

    pp_at_comlab

    Joined:
    Oct 13, 2008
    Messages:
    2
    Similar Problem as the first post

    I'm getting a similar error as the first guy on the thread:

    clpc129[/home/scratch/Insight-work]$ ccmake . ../Insight-binary/


    clpc129[/home/scratch/Insight-work]$ make
    Linking CXX executable HelloWorld
    /usr/bin/ld: cannot find -lITKCommon
    collect2: ld returned 1 exit status
    make[2]: *** [HelloWorld] Error 1
    make[1]: *** [CMakeFiles/HelloWorld.dir/all] Error 2
    make: *** [all] Error 2

    I'm having a bit of problems figuring out what the error could be. Is there anyone that could give me a hand with this?
     
    pp_at_comlab, Oct 13, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bobrics

    collect2: ld returned 1 exit status

    bobrics, Apr 22, 2006, in forum: C Programming
    Replies:
    5
    Views:
    1,022
    Andrew Poelstra
    Apr 22, 2006
  2. crankin

    collect2: ld returned 1 exit status

    crankin, May 29, 2007, in forum: C Programming
    Replies:
    0
    Views:
    725
    crankin
    May 29, 2007
  3. rkeane

    collect2: ld returned 1 exit status

    rkeane, Jun 20, 2007, in forum: C Programming
    Replies:
    0
    Views:
    2,110
    rkeane
    Jun 20, 2007
  4. Navaneet

    Error: collect2: ld returned 1 exit status

    Navaneet, Sep 12, 2007, in forum: C Programming
    Replies:
    2
    Views:
    2,495
    jacob navia
    Sep 12, 2007
  5. pp_at_comlab
    Replies:
    0
    Views:
    4,578
    pp_at_comlab
    Oct 13, 2008
Loading...

Share This Page