Results 1 to 7 of 7

Thread: learning c++ - collect2: ld returned 1 exit status

  1. #1
    Join Date
    May 2008
    Posts
    46

    learning c++ - collect2: ld returned 1 exit status

    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,,

  2. #2
    Join Date
    May 2008
    Posts
    487

    Re: learning c++ - collect2: ld returned 1 exit status

    Quote Originally Posted by palfit View Post
    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,,
    Try 'man ld'.

  3. #3
    Join Date
    Apr 2008
    Posts
    2,565

    Re: learning c++ - collect2: ld returned 1 exit status

    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.

  4. #4
    Dr. V Guest

    Re: learning c++ - collect2: ld returned 1 exit status

    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.

  5. #5
    Join Date
    May 2008
    Posts
    40

    Re: learning c++ - collect2: ld returned 1 exit status

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

    error trace is attached for the reference ::



    Code:
    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

  6. #6
    Join Date
    May 2008
    Posts
    54

    Re: learning c++ - collect2: ld returned 1 exit status

    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 :

    Code:
    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 !!!

  7. #7
    Join Date
    May 2008
    Posts
    21

    Re: learning c++ - collect2: ld returned 1 exit status

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

    Code:
    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?

Similar Threads

  1. Missing trees never returned in Farmville
    By Visitator in forum Video Games
    Replies: 4
    Last Post: 18-02-2011, 11:54 PM
  2. Replies: 3
    Last Post: 22-09-2009, 09:38 AM
  3. Number of rows returned by SQL query
    By odumitre in forum Software Development
    Replies: 2
    Last Post: 12-08-2009, 05:11 PM
  4. Error : command 'gcc' failed with exit status 1
    By _Gentoo_Nile_ in forum Operating Systems
    Replies: 3
    Last Post: 07-08-2009, 06:57 PM
  5. Incorrect IP address returned from DNS
    By Rob Nicholson in forum Windows Server Help
    Replies: 1
    Last Post: 15-06-2008, 09:18 PM

Tags for this Thread

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
  •  
Page generated in 1,713,559,441.04517 seconds with 17 queries