Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 25-10-2008
Member
 
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,,
Reply With Quote
  #2  
Old 25-10-2008
Member
 
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'.
Reply With Quote
  #3  
Old 25-10-2008
Member
 
Join Date: Apr 2008
Posts: 2,563
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.
__________________
Far Cry 2 Preview
Reply With Quote
  #4  
Old 25-10-2008
Dr. V
 
Posts: n/a
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.
Reply With Quote
  #5  
Old 25-10-2008
Member
 
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
Reply With Quote
  #6  
Old 25-10-2008
Member
 
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 !!!
Reply With Quote
  #7  
Old 25-10-2008
Member
 
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?
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "learning c++ - collect2: ld returned 1 exit status"
Thread Thread Starter Forum Replies Last Post
Missing trees never returned in Farmville Visitator Video Games 4 18-02-2011 11:54 PM
How do we write exit procedure or function in javascript to exit middle of the program? Jevin Software Development 3 22-09-2009 09:38 AM
Number of rows returned by SQL query odumitre Software Development 2 12-08-2009 05:11 PM
Error : command 'gcc' failed with exit status 1 _Gentoo_Nile_ Operating Systems 3 07-08-2009 06:57 PM
Incorrect IP address returned from DNS Rob Nicholson Windows Server Help 1 15-06-2008 09:18 PM


All times are GMT +5.5. The time now is 06:37 PM.