Discussion:
Build Berkeley-db on MinGW
(too old to reply)
z***@yahoo.com.cn
2006-11-20 10:07:40 UTC
Permalink
Hi, all:

I am trying to build the Berkeley-db on the MinGW platform.

I used the command list below to build it:

../dist/configure --enable-mingw
make

But when creating the library file, the error comes:

...
Creating library file: .libs/libdb-4.5.dll.a
.libs/os_errno.o(.text+0x286):os_errno.c: undefined reference to
`***@0'
.libs/os_errno.o(.text+0x2ae):os_errno.c: undefined reference to
`***@4'
make: *** [libdb-4.5.la] Error 1
..

I am trying to fix this error according to the solution found on the
web by exporting LIBS environment variable as -WS2_32.lib. But after I
did it, the error will occur when doing the configure. The error is:

...
checking for cc... no
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C
compiler cannot create executables
See `config.log' for more details.
...

Do you have any idea about this problem?

The version of db is 4.5.20;
MinGW version is 3.1.0-1
MSYS version is 1.0.10

Thanks in advance.

Min
d***@step.polymtl.ca
2006-12-14 21:07:49 UTC
Permalink
Post by z***@yahoo.com.cn
I am trying to build the Berkeley-db on the MinGW platform.
Did 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 and I even think this is cheating on the
role of this variable (LIBCSO_LIBS), but it seems to have been working
for me.

Let me know

Evens
i***@gmail.com
2007-02-01 04:32:10 UTC
Permalink
Post by d***@step.polymtl.ca
cd <wherever>/db-4.5.20/build_unix
../dist/configure --enable-mingw LIBCSO_LIBS=-lwsock32
make
This is the one that worked for me.

Just one more comment, if you are going to build libdb_cxx library,
you will need also specify LIBXSO_LIBS besides LIBCSO_LIBS.

Thanks,

Isaque.

Loading...