Fix error when ccompile by mingw32 and remove the $ from example shell script (#448)
Some checks failed
build / linux (clang, disable-glib, disable-iconv) (push) Has been cancelled
build / linux (clang, disable-glib, enable-iconv) (push) Has been cancelled
build / linux (clang, enable-glib, disable-iconv) (push) Has been cancelled
build / linux (clang, enable-glib, enable-iconv) (push) Has been cancelled
build / linux (gcc, disable-glib, disable-iconv) (push) Has been cancelled
build / linux (gcc, disable-glib, enable-iconv) (push) Has been cancelled
build / linux (gcc, enable-glib, disable-iconv) (push) Has been cancelled
build / linux (gcc, enable-glib, enable-iconv) (push) Has been cancelled
build / linux (gcc-10, disable-glib, disable-iconv) (push) Has been cancelled
build / linux (gcc-10, disable-glib, enable-iconv) (push) Has been cancelled
build / linux (gcc-10, enable-glib, disable-iconv) (push) Has been cancelled
build / linux (gcc-10, enable-glib, enable-iconv) (push) Has been cancelled
build / linux (gcc-9, disable-glib, disable-iconv) (push) Has been cancelled
build / linux (gcc-9, disable-glib, enable-iconv) (push) Has been cancelled
build / linux (gcc-9, enable-glib, disable-iconv) (push) Has been cancelled
build / linux (gcc-9, enable-glib, enable-iconv) (push) Has been cancelled
build / macos (clang, disable-glib, disable-iconv) (push) Has been cancelled
build / macos (clang, disable-glib, enable-iconv) (push) Has been cancelled
build / macos (clang, enable-glib, disable-iconv) (push) Has been cancelled
build / macos (clang, enable-glib, enable-iconv) (push) Has been cancelled
build / macos (gcc, disable-glib, disable-iconv) (push) Has been cancelled
build / macos (gcc, disable-glib, enable-iconv) (push) Has been cancelled
build / macos (gcc, enable-glib, disable-iconv) (push) Has been cancelled
build / macos (gcc, enable-glib, enable-iconv) (push) Has been cancelled
build / macos-iodbc (clang, disable-glib) (push) Has been cancelled
build / macos-iodbc (clang, enable-glib) (push) Has been cancelled
build / macos-iodbc (gcc, disable-glib) (push) Has been cancelled
build / macos-iodbc (gcc, enable-glib) (push) Has been cancelled
build / windows (disable-glib, disable-iconv) (push) Has been cancelled
build / windows (disable-glib, enable-iconv) (push) Has been cancelled
build / windows (enable-glib, disable-iconv) (push) Has been cancelled
build / windows (enable-glib, enable-iconv) (push) Has been cancelled

* Fix build error with mingw32

* Remove $ from shell example

---------

Co-authored-by: hacrot3000 <hacrot3000@gmail.com>
This commit is contained in:
Trương Chương Dương 2025-05-20 20:00:20 +07:00 committed by GitHub
parent b81b1c9271
commit 6ed4188994
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 7 deletions

View File

@ -116,19 +116,26 @@ If you have cloned the Git repository, you will first need to generate the
`configure` file (skip this step if you have downloaded a formal release):
```bash
$ autoreconf -i -f
autoreconf -i -f
```
Then:
```bash
$ ./configure
./configure
```
OR with mingw32 (--disable-shared --enable-static are optional as you knew):
```bash
./configure --host=x86_64-w64-mingw32 --disable-shared --enable-static
```
OR for a complete install (requires bison, flex, and unixODBC):
```bash
$ ./configure --with-unixodbc=/usr/local
./configure --with-unixodbc=/usr/local
```
By default, MDB Tools is linked against the copy of
@ -155,7 +162,7 @@ with a Unicode-capable driver at /usr/local/lib/odbc/libmdbodbcW.so.
The command `configure --help` will give you the list of mdbtools specific options.
```bash
$ make
make
```
Once MDB Tools has been compiled, libmdb.[so|a] will be in the src/libmdb
@ -164,14 +171,14 @@ directory and the utility programs will be in the src/util directory.
You can then install (to /usr/local by default) by running the following as root:
```bash
$ make install
make install
```
Some systems will also need the ld cache to be updated after installation;
You can do that running:
```bash
$ ldconfig
ldconfig
```
## Hacking

View File

@ -86,7 +86,7 @@ AC_SUBST(LFLAGS)
CFLAGS="$CFLAGS -Wall"
LOCALE_T=locale_t
AS_CASE([$host],
[*mingw*], [LDFLAGS="$LDFLAGS -no-undefined" CFLAGS="$CFLAGS -D_spawnv=spawnv"], [])
[*mingw*], [LDFLAGS="$LDFLAGS -no-undefined" CFLAGS="$CFLAGS -D_spawnv=_spawnv"], [])
AC_SUBST(LOCALE_T)
dnl See if iconv is present and wanted

View File

@ -68,6 +68,13 @@
// M$VC see http://stackoverflow.com/questions/1113409/attribute-constructor-equivalent-in-vc
#define MDB_DEPRECATED(type, funcname) type __attribute__((deprecated)) funcname
#ifdef __MINGW32__
#include <stdlib.h>
#ifndef locale_t
typedef _locale_t locale_t;
#endif
#endif
typedef @LOCALE_T@ mdb_locale_t;
enum {