dbTalk Databases Forums  

MinGW compile problem!

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss MinGW compile problem! in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
gschen
 
Posts: n/a

Default MinGW compile problem! - 11-09-2006 , 01:36 AM






Hi,
I can not compile db-4.5.20.NC with MinGW.
It tell me :
"
Creating library file: .libs/libdb-4.5.dll.a
..libs/os_errno.o(.text+0x56)s_errno.c: undefined reference to
`WSAGetLastError@0'
..libs/os_errno.o(.text+0x6a)s_errno.c: undefined reference to
`WSASetLastError@4'
"
It seems that there must link some library. How can I fix it? Thank you!


Reply With Quote
  #2  
Old   
Alex
 
Posts: n/a

Default Re: MinGW compile problem! - 11-09-2006 , 03:57 PM







gschen wrote:
Quote:
Hi,
I can not compile db-4.5.20.NC with MinGW.
It tell me :
"
Creating library file: .libs/libdb-4.5.dll.a
.libs/os_errno.o(.text+0x56)s_errno.c: undefined reference to
`WSAGetLastError@0'
.libs/os_errno.o(.text+0x6a)s_errno.c: undefined reference to
`WSASetLastError@4'
"
It seems that there must link some library. How can I fix it? Thank you!
Did you try adding WS2_32.lib to your LIBS environment variable before
running configure? Something like
LIBS=-WS2_32.lib

Regards,
Alex



Reply With Quote
  #3  
Old   
gschen
 
Posts: n/a

Default Re: MinGW compile problem! - 11-10-2006 , 04:07 AM




"Alex дµÀ£º
"
Quote:
gschen wrote:
Hi,
I can not compile db-4.5.20.NC with MinGW.
It tell me :
"
Creating library file: .libs/libdb-4.5.dll.a
.libs/os_errno.o(.text+0x56)s_errno.c: undefined reference to
`WSAGetLastError@0'
.libs/os_errno.o(.text+0x6a)s_errno.c: undefined reference to
`WSASetLastError@4'
"
It seems that there must link some library. How can I fix it? Thank you!

Did you try adding WS2_32.lib to your LIBS environment variable before
running configure? Something like
LIBS=-WS2_32.lib

Regards,
Alex

Thank you Alex, I fix it!



Reply With Quote
  #4  
Old   
NM
 
Posts: n/a

Default Re: MinGW compile problem! - 11-10-2006 , 09:44 AM



$ cd /c/db-4.3.29/build_unix
$ ../dist/configure -enable-cxx -enable-mingw
$ make


gschen wrote:
Quote:
"Alex дµÀ£º
"
gschen wrote:
Hi,
I can not compile db-4.5.20.NC with MinGW.
It tell me :
"
Creating library file: .libs/libdb-4.5.dll.a
.libs/os_errno.o(.text+0x56)s_errno.c: undefined reference to
`WSAGetLastError@0'
.libs/os_errno.o(.text+0x6a)s_errno.c: undefined reference to
`WSASetLastError@4'
"
It seems that there must link some library. How can I fix it? Thank you!

Did you try adding WS2_32.lib to your LIBS environment variable before
running configure? Something like
LIBS=-WS2_32.lib

Regards,
Alex


Thank you Alex, I fix it!


Reply With Quote
  #5  
Old   
dfrost@step.polymtl.ca
 
Posts: n/a

Default Re: MinGW compile problem! - 12-14-2006 , 03:14 PM




On Nov 9, 2:36 am, "gschen" <gsche... (AT) gmail (DOT) com> wrote:
Quote:
Hi,
I can not compile db-4.5.20.NC with MinGW.
It tell me :
"
Creating library file: .libs/libdb-4.5.dll.a
.libs/os_errno.o(.text+0x56)s_errno.c: undefined reference to
`WSAGetLastError@0'
.libs/os_errno.o(.text+0x6a)s_errno.c: undefined reference to
`WSASetLastError@4'
"
It seems that there must link some library. How can I fix it? Thank you!
Try this:

cd <wherever>/db-4.5.20/build_unix
.../dist/configure --enable-mingw LIBCSO_LIBS=-lwsock32
make

I don't know if it's legal, but it seems to have worked for me.

Let me know

Evens



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.