public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Earnie Boyd <earnie_boyd@yahoo.com>
To: Kirth <kirth@hole.org>, cygwin@sourceware.cygnus.com
Subject: Re: ld problems
Date: Wed, 22 Mar 2000 05:44:00 -0000	[thread overview]
Message-ID: <20000322134420.1595.qmail@web110.yahoomail.com> (raw)

--- Kirth <kirth@hole.org> wrote:
> unfortuanlty the same thing
> 
> g++   -o ffind config.o sql.o query.o parseword.o ffind.o
> -L/usr/local/lib/mysql
>   -lmysqlclient
>
/cygnus/CYGWIN~1/H-I586~1/bin/../lib/gcc-lib/i586-cygwin32/2.95.2/../../../../i5
> 86-cygwin32/bin/ld: cannot open -lmysqlclient: No such file or directory
> collect2: ld returned 1 exit status
> make: *** [ffind] Error 1
> 
> ive even tried with -L./ and put the file in the same dir
> ive renamed it mysqlclient, mysqlclient.so, mysqlclient.a ... all 
> fail. 


The library file name must be libmysqlclient.a for the -l switch to work. 
Another option is to just list the library file on the command line like this:

g++ -o ffind config.o sql.o query.o parseword.o ffind.o \
  /usr/local/lib/mysql/libmysqlclient.a

The GCC will recognize the library and use it properly.
> 
> i read something in the mailing list about removing collect2
> so that ld gets run directly, but i dont have a collect2 file (at all)
> 

The collect2 problem isn't your problem here.  That has to do with seeing the
output from ld which you're seeing.  And yes you have it, you'll find it under
the lib/gcc-lib subdirectories.  To get the exact location you can gcc
--print-file-name=specs and the directory in which the specs file is the same
directory that the collect2 program is located.


=====
---
   Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
            __Cygwin: POSIX on Windows__
Cygwin Newbies: < http://www.freeyellow.com/members5/gw32/index.html >
           __Minimalist GNU for Windows__
  Mingw32 List: < http://www.egroups.com/group/mingw32/ >
    Mingw Home: < http://www.mingw.org/ >

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

             reply	other threads:[~2000-03-22  5:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-22  5:44 Earnie Boyd [this message]
2000-03-22  7:05 ` Kirth
2000-03-22  7:21   ` Kirth
  -- strict thread matches above, loose matches on Subject: below --
2000-03-22 10:19 Earnie Boyd
2000-03-22 10:08 Earnie Boyd
2000-03-22 10:11 ` Kirth
2000-03-22  5:22 Earnie Boyd
2000-03-22  5:28 ` Kirth
2000-03-22  3:41 Kirth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000322134420.1595.qmail@web110.yahoomail.com \
    --to=earnie_boyd@yahoo.com \
    --cc=cygwin@sourceware.cygnus.com \
    --cc=kirth@hole.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).