public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: ld problems
@ 2000-03-22  5:22 Earnie Boyd
  2000-03-22  5:28 ` Kirth
  0 siblings, 1 reply; 9+ messages in thread
From: Earnie Boyd @ 2000-03-22  5:22 UTC (permalink / raw)
  To: Kirth, cygwin

--- Kirth <kirth@hole.org> wrote:
> I saw this was covered last month in the mailing lists, and the
> recommendation was to upgrade binutils.
> Well heres the error first
> 
> bash-2.02$ make
> g++  -L/usr/local/lib/mysql  -o ffind config.o sql.o query.o parseword.o
> ffind.o
>  -lmysqlclient

I'm not saying this will help but since switch position matters, what happens
if you move the -L/usr/local/lib/mysql to just before the -lmysqlclient?



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ld problems
  2000-03-22  5:22 ld problems Earnie Boyd
@ 2000-03-22  5:28 ` Kirth
  0 siblings, 0 replies; 9+ messages in thread
From: Kirth @ 2000-03-22  5:28 UTC (permalink / raw)
  To: earnie_boyd, Kirth, cygwin

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. 

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)

Thanks

* Earnie Boyd (earnie_boyd@yahoo.com) [000322 13:20]:
> --- Kirth <kirth@hole.org> wrote:
> > I saw this was covered last month in the mailing lists, and the
> > recommendation was to upgrade binutils.
> > Well heres the error first
> > 
> > bash-2.02$ make
> > g++  -L/usr/local/lib/mysql  -o ffind config.o sql.o query.o parseword.o
> > ffind.o
> >  -lmysqlclient
> 
> I'm not saying this will help but since switch position matters, what happens
> if you move the -L/usr/local/lib/mysql to just before the -lmysqlclient?
> 
> 
> 
> =====
> ---
>    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
> 

-- 
Kirth
i-docs.org       - interactive Documentation (i-D)      kirth@i-docs.org
www.oal.co.uk    - Octopus Associates Ltd (OAL)         kirth@oal.co.uk
www.cu3ed.net    - Cubed                                kirth@cu3ed.net
www.worldpop.com - WorldPop Ltd (Consultant)            kirth@worldpop.com
black.hole.org   - Personal Pages                       kirth@hole.org

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ld problems
@ 2000-03-22 10:19 Earnie Boyd
  0 siblings, 0 replies; 9+ messages in thread
From: Earnie Boyd @ 2000-03-22 10:19 UTC (permalink / raw)
  To: Kirth, cygwin

--- Kirth <kirth@hole.org> wrote:
> sorry, i wasnt using any ms dll's, what i meant was i tried the cygnus port
> AND a copy of mysqlclient library taken off my linux box....
> 
> it finds the lib fine now, but doesnt seem to know whats in it
> 
> 

Yow!!  You can't do that.



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ld problems
  2000-03-22 10:08 Earnie Boyd
@ 2000-03-22 10:11 ` Kirth
  0 siblings, 0 replies; 9+ messages in thread
From: Kirth @ 2000-03-22 10:11 UTC (permalink / raw)
  To: earnie_boyd, Kirth, cygwin

sorry, i wasnt using any ms dll's, what i meant was i tried the cygnus port
AND a copy of mysqlclient library taken off my linux box....

it finds the lib fine now, but doesnt seem to know whats in it


* Earnie Boyd (earnie_boyd@yahoo.com) [000322 18:06]:
> --- Kirth <kirth@hole.org> wrote:
> > ahh right that fixed it, mind you im not getting undefined reference's
> > to thinks like mysql_init .. theres are definitly part of the mysqlclient
> > lib. I had thought to compilie mysql myself, however it gives a few hundred
> > errors, so that was no go.
> > 
> 
> Hmm... I believe I remember a post that mysql had been ported to Cygwin. Check
> the archives and the ported packages information on the Cygwin pages at
> sourceware.cygnus.com.
> 
> > Any suggestions ? ive tried the library that comes with mysql for windows,
> > the one from the extra mysqlclients package, and even copying across
> > my linux library, all give roughly the same undefined reference's.
> > 
> 
> I wasn't aware that you were using a M$ built library.  Anders Norlander has a
> program he's called pexports which is able to read a dll if you have the
> headers and create a def file so that you can create an import library.  You
> can find pexports at his URL of
> http://www.acc.umu.se/~anorland/gnu-win32/index.html .
> 
> The caveat to this is that the Non-Cygwin mysql.dll won't understand the Cygwin
> mounted paths.
> 
> Good Luck,
> Earnie.
> 
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com

-- 
Kirth
i-docs.org       - interactive Documentation (i-D)      kirth@i-docs.org
www.oal.co.uk    - Octopus Associates Ltd (OAL)         kirth@oal.co.uk
www.cu3ed.net    - Cubed                                kirth@cu3ed.net
www.worldpop.com - WorldPop Ltd (Consultant)            kirth@worldpop.com
black.hole.org   - Personal Pages                       kirth@hole.org

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ld problems
@ 2000-03-22 10:08 Earnie Boyd
  2000-03-22 10:11 ` Kirth
  0 siblings, 1 reply; 9+ messages in thread
From: Earnie Boyd @ 2000-03-22 10:08 UTC (permalink / raw)
  To: Kirth, cygwin

--- Kirth <kirth@hole.org> wrote:
> ahh right that fixed it, mind you im not getting undefined reference's
> to thinks like mysql_init .. theres are definitly part of the mysqlclient
> lib. I had thought to compilie mysql myself, however it gives a few hundred
> errors, so that was no go.
> 

Hmm... I believe I remember a post that mysql had been ported to Cygwin. Check
the archives and the ported packages information on the Cygwin pages at
sourceware.cygnus.com.

> Any suggestions ? ive tried the library that comes with mysql for windows,
> the one from the extra mysqlclients package, and even copying across
> my linux library, all give roughly the same undefined reference's.
> 

I wasn't aware that you were using a M$ built library.  Anders Norlander has a
program he's called pexports which is able to read a dll if you have the
headers and create a def file so that you can create an import library.  You
can find pexports at his URL of
http://www.acc.umu.se/~anorland/gnu-win32/index.html .

The caveat to this is that the Non-Cygwin mysql.dll won't understand the Cygwin
mounted paths.

Good Luck,
Earnie.

__________________________________________________
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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ld problems
  2000-03-22  7:05 ` Kirth
@ 2000-03-22  7:21   ` Kirth
  0 siblings, 0 replies; 9+ messages in thread
From: Kirth @ 2000-03-22  7:21 UTC (permalink / raw)
  To: Kirth, earnie_boyd, cygwin

the error's are:

sql.o: In function `_tf22_IO_istream_withassign':
/mnt/cygwin/ffind/src/sql.cpp(.text+0xe): undefined reference to `mysql_init'
/mnt/cygwin/ffind/src/sql.cpp(.text+0x2e): undefined reference to
`mysql_real_co
nnect'
sql.o: In function `sql_disconnect(st_mysql *, st_mysql_res *)':
/mnt/cygwin/ffind/src/sql.cpp:34: undefined reference to `mysql_free_result'
/mnt/cygwin/ffind/src/sql.cpp:35: undefined reference to `mysql_close'
sql.o: In function `sql_do_query(char *, st_mysql *)':
/mnt/cygwin/ffind/src/sql.cpp:43: undefined reference to `mysql_query'
/mnt/cygwin/ffind/src/sql.cpp:49: undefined reference to `mysql_use_result'
query.o: In function `Query::Do(st_mysql *)':
/mnt/cygwin/ffind/src/query.cpp:222: undefined reference to `mysql_fetch_row'
/mnt/cygwin/ffind/src/query.cpp:225: undefined reference to
`mysql_fetch_lengths
'
make: *** [ffind] Error 1

*sigh* one step forward, two back .. at least thats what this is feeling like 

thanks again

* Kirth (kirth@hole.org) [000322 15:02]:
> ahh right that fixed it, mind you im not getting undefined reference's
> to thinks like mysql_init .. theres are definitly part of the mysqlclient
> lib. I had thought to compilie mysql myself, however it gives a few hundred
> errors, so that was no go.
> 
> Any suggestions ? ive tried the library that comes with mysql for windows,
> the one from the extra mysqlclients package, and even copying across
> my linux library, all give roughly the same undefined reference's.
> 
> sorry if thats a bit OT, mysql doesnt seem to have a mailing list
> for compiling under cygwin with it.
> 
> Regards
> 
> * Earnie Boyd (earnie_boyd@yahoo.com) [000322 13:41]:
> > --- 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
> > 
> 
> -- 
> Kirth
> i-docs.org       - interactive Documentation (i-D)      kirth@i-docs.org
> www.oal.co.uk    - Octopus Associates Ltd (OAL)         kirth@oal.co.uk
> www.cu3ed.net    - Cubed                                kirth@cu3ed.net
> www.worldpop.com - WorldPop Ltd (Consultant)            kirth@worldpop.com
> black.hole.org   - Personal Pages                       kirth@hole.org

-- 
Kirth
i-docs.org       - interactive Documentation (i-D)      kirth@i-docs.org
www.oal.co.uk    - Octopus Associates Ltd (OAL)         kirth@oal.co.uk
www.cu3ed.net    - Cubed                                kirth@cu3ed.net
www.worldpop.com - WorldPop Ltd (Consultant)            kirth@worldpop.com
black.hole.org   - Personal Pages                       kirth@hole.org

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ld problems
  2000-03-22  5:44 Earnie Boyd
@ 2000-03-22  7:05 ` Kirth
  2000-03-22  7:21   ` Kirth
  0 siblings, 1 reply; 9+ messages in thread
From: Kirth @ 2000-03-22  7:05 UTC (permalink / raw)
  To: earnie_boyd, Kirth, cygwin

ahh right that fixed it, mind you im not getting undefined reference's
to thinks like mysql_init .. theres are definitly part of the mysqlclient
lib. I had thought to compilie mysql myself, however it gives a few hundred
errors, so that was no go.

Any suggestions ? ive tried the library that comes with mysql for windows,
the one from the extra mysqlclients package, and even copying across
my linux library, all give roughly the same undefined reference's.

sorry if thats a bit OT, mysql doesnt seem to have a mailing list
for compiling under cygwin with it.

Regards

* Earnie Boyd (earnie_boyd@yahoo.com) [000322 13:41]:
> --- 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
> 

-- 
Kirth
i-docs.org       - interactive Documentation (i-D)      kirth@i-docs.org
www.oal.co.uk    - Octopus Associates Ltd (OAL)         kirth@oal.co.uk
www.cu3ed.net    - Cubed                                kirth@cu3ed.net
www.worldpop.com - WorldPop Ltd (Consultant)            kirth@worldpop.com
black.hole.org   - Personal Pages                       kirth@hole.org

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ld problems
@ 2000-03-22  5:44 Earnie Boyd
  2000-03-22  7:05 ` Kirth
  0 siblings, 1 reply; 9+ messages in thread
From: Earnie Boyd @ 2000-03-22  5:44 UTC (permalink / raw)
  To: Kirth, cygwin

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* ld problems
@ 2000-03-22  3:41 Kirth
  0 siblings, 0 replies; 9+ messages in thread
From: Kirth @ 2000-03-22  3:41 UTC (permalink / raw)
  To: cygwin

I saw this was covered last month in the mailing lists, and the
recommendation was to upgrade binutils.
Well heres the error first

bash-2.02$ make
g++  -L/usr/local/lib/mysql  -o ffind config.o sql.o query.o parseword.o
ffind.o
 -lmysqlclient
/cygnus/CYGWIN~1/H-I586~1/i586-cygwin32/bin/ld: cannot open -lmysqlclient: No
su
ch file or directory
collect2: ld returned 1 exit status
make: *** [ffind] Error 1
bash-2.02$ ld --version
GNU ld 2.9.5
Copyright 1997 Free Software Foundation, Inc.

now i have created /usr/local/lib/mysql and put the lib file in there, it
refuses to fine ANY of the lib files... i tried including the ones supplied
in the full.exe file.

Any suggestions ?
(note: i need to get this working today, or abandon it, dont you hate project
deadlines ?)

Regards, 
Kirth

-- 
Kirth
i-docs.org       - interactive Documentation (i-D)      kirth@i-docs.org
www.oal.co.uk    - Octopus Associates Ltd (OAL)         kirth@oal.co.uk
www.cu3ed.net    - Cubed                                kirth@cu3ed.net
www.worldpop.com - WorldPop Ltd (Consultant)            kirth@worldpop.com
black.hole.org   - Personal Pages                       kirth@hole.org

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2000-03-22 10:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-22  5:22 ld problems Earnie Boyd
2000-03-22  5:28 ` 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:44 Earnie Boyd
2000-03-22  7:05 ` Kirth
2000-03-22  7:21   ` Kirth
2000-03-22  3:41 Kirth

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).