Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compile for windows on macOS. Says first call to package not found #112

Closed
whit-colm opened this issue Feb 14, 2018 · 9 comments
Closed

Comments

@whit-colm
Copy link

Undefined package used when attempting to compile for windows:

I have built a tiny wrapper for Gosseract for my own personal use, but when attempting to compile for windows (on mac) I get an error. There is never an issue and the system works perfectly when compiling for macOS but I get an error without fail when compiling for windows.

Reproducibility

Reproducility Frequency

  • 100%

How to reproduce:

Command I'm running:

me@myMachine:ocr$ GOOS=windows GOARCH=amd64 go build -o ./gOCR_64bit.exe main.go
# github.com/whitman-colm/ocr
./main.go:37:12: undefined: gosseract.NewClient
me@myMachine:ocr$ 

Environment

uname -a

Darwin myMachine.local 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
go env:

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/whitman-colm/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.9.4/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.9.4/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/by/2f56zv9900s3461pw8wxmfm80000gn/T/go-build487344255=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
go version go1.9.4 darwin/amd64
tesseract --version

tesseract 3.05.01
 leptonica-1.75.2
  libjpeg 9b : libpng 1.6.34 : libtiff 4.0.9 : zlib 1.2.11

Take the entire script if you must, sorry about the verbosity but the windows compilation is for my friends who aren't anything like computer savvy and need things spelled out for them (which is why I've commented out the init statement for the time being:

main.go.txt
)

@otiai10
Copy link
Owner

otiai10 commented Feb 14, 2018

got the same error

% GOOS=windows GOARCH=amd64 go build -o ./gOCR_64bit.exe main.go
# command-line-arguments
./main.go:38: undefined: gosseract.NewClient
%
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/otiai10/proj/go"
GORACE=""
GOROOT="/Users/otiai10/.go/1.8.1"
GOTOOLDIR="/Users/otiai10/.go/1.8.1/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/go-build847878765=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
package main

import (
	//"flag"
	"fmt"
	"io/ioutil"

	"github.com/otiai10/gosseract"
	"github.com/whitman-colm/go-lib/src/input"
)

var (
	image  string
	output string
)

/*func init() {
	st1 := `Path to the image to be OCR'd.`
	st2 := `Where to direct output of file. Leave blank to pipe to stdout.`
	flag.StringVar(&image, "i", "", st1)
	flag.StringVar(&output, "o", "", st2)
	flag.Parse()
}*/

func main() {
	image := ""
	output := ""
	if image == "" {
		fmt.Println("Please provide the path to an image file.")
		fmt.Println("Accepted formats are .png, .jpeg, and .tiff.")
		fmt.Println("If you're not sure what a path is, drag an image file into this window.")
		image = input.StringInput("> ")
	}
	if output == "" {
		fmt.Println("Provide an output file (leave blank to print result to console)")
		output = input.StringInput("> ")
	}
	client := gosseract.NewClient()
	defer client.Close()

	client.SetImage(image)
	text, err := client.Text()

	if err != nil {
		panic(err)
	}

	if output != "" {
		tAsByte := []byte(text)
		err = ioutil.WriteFile(output, tAsByte, 0644)
		if err != nil {
			panic(err)
		}
	} else {
		fmt.Println(text)
		_ = input.StringInput("press enter when done. ")
	}
}

@otiai10
Copy link
Owner

otiai10 commented Feb 14, 2018

% brew search mingw
% brew install mingw-w64
% CPLUS_INCLUDE_PATH=/usr/local/include \
    CGO_ENABLED=1 \
    CC=x86_64-w64-mingw32-gcc \
    CXX=x86_64-w64-mingw32-g++ \
    GOOS=windows \
    GOARCH=amd64 \
    go build -o ./out.exe main.go
# github.com/otiai10/gosseract
/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/go-build517521774/github.com/otiai10/gosseract/_obj/tessbridge.cpp.o: In function `Create':
../../proj/go/src/github.com/otiai10/gosseract/tessbridge.cpp:12: undefined reference to `tesseract::TessBaseAPI::TessBaseAPI()'
/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/go-build517521774/github.com/otiai10/gosseract/_obj/tessbridge.cpp.o: In function `Free':
../../proj/go/src/github.com/otiai10/gosseract/tessbridge.cpp:18: undefined reference to `tesseract::TessBaseAPI::End()'
/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/go-build517521774/github.com/otiai10/gosseract/_obj/tessbridge.cpp.o: In function `tesseract::TessBaseAPI::Init(char const*, char const*)':
/usr/local/include/tesseract/baseapi.h:241: undefined reference to `tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char**, int, GenericVector<STRING> const*, GenericVector<STRING> const*, bool)'
/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/go-build517521774/github.com/otiai10/gosseract/_obj/tessbridge.cpp.o: In function `Init':
../../proj/go/src/github.com/otiai10/gosseract/tessbridge.cpp:32: undefined reference to `tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char**, int, GenericVector<STRING> const*, GenericVector<STRING> const*, bool)'
/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/go-build517521774/github.com/otiai10/gosseract/_obj/tessbridge.cpp.o: In function `tesseract::TessBaseAPI::Init(char const*, char const*)':
/usr/local/include/tesseract/baseapi.h:241: undefined reference to `tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char**, int, GenericVector<STRING> const*, GenericVector<STRING> const*, bool)'
/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/go-build517521774/github.com/otiai10/gosseract/_obj/tessbridge.cpp.o: In function `SetImage':
../../proj/go/src/github.com/otiai10/gosseract/tessbridge.cpp:45: undefined reference to `pixRead'
/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/go-build517521774/github.com/otiai10/gosseract/_obj/tessbridge.cpp.o: In function `SetVariable':
../../proj/go/src/github.com/otiai10/gosseract/tessbridge.cpp:40: undefined reference to `tesseract::TessBaseAPI::SetVariable(char const*, char const*)'
/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/go-build517521774/github.com/otiai10/gosseract/_obj/tessbridge.cpp.o: In function `SetImage':
../../proj/go/src/github.com/otiai10/gosseract/tessbridge.cpp:46: undefined reference to `tesseract::TessBaseAPI::SetImage(Pix*)'
/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/go-build517521774/github.com/otiai10/gosseract/_obj/tessbridge.cpp.o: In function `SetPageSegMode':
../../proj/go/src/github.com/otiai10/gosseract/tessbridge.cpp:52: undefined reference to `tesseract::TessBaseAPI::SetPageSegMode(tesseract::PageSegMode)'
/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/go-build517521774/github.com/otiai10/gosseract/_obj/tessbridge.cpp.o: In function `GetPageSegMode':
../../proj/go/src/github.com/otiai10/gosseract/tessbridge.cpp:57: undefined reference to `tesseract::TessBaseAPI::GetPageSegMode() const'
/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/go-build517521774/github.com/otiai10/gosseract/_obj/tessbridge.cpp.o: In function `UTF8Text':
../../proj/go/src/github.com/otiai10/gosseract/tessbridge.cpp:62: undefined reference to `tesseract::TessBaseAPI::GetUTF8Text()'
/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/go-build517521774/github.com/otiai10/gosseract/_obj/tessbridge.cpp.o: In function `HOCRText':
../../proj/go/src/github.com/otiai10/gosseract/tessbridge.cpp:67: undefined reference to `tesseract::TessBaseAPI::GetHOCRText(int)'
/var/folders/__/xxcbtw6j0tb681fjv1lbnlg40000gn/T/go-build517521774/github.com/otiai10/gosseract/_obj/tessbridge.cpp.o: In function `Version':
../../proj/go/src/github.com/otiai10/gosseract/tessbridge.cpp:72: undefined reference to `tesseract::TessBaseAPI::Version()'
collect2: error: ld returned 1 exit status
%

@otiai10
Copy link
Owner

otiai10 commented Feb 14, 2018

docker run -it --rm -v `pwd`:/tmp otiai10/gosseract
go test -v github.com/otiai10/gosseract
go get github.com/whitman-colm/go-lib/src/input
apt-get -y install mingw-w64
apt-get install -y g++-multilib
CPLUS_INCLUDE_PATH=/usr/include \
  CGO_ENABLED=1 \
  CC=x86_64-w64-mingw32-gcc \
  CXX=x86_64-w64-mingw32-g++ \
  GOOS=windows \
  GOARCH=amd64 \
  go build -o ./out.exe /tmp/main.go
# github.com/otiai10/gosseract
In file included from /usr/include/tesseract/baseapi.h:28:0,
                 from tessbridge.cpp:5:
/usr/include/stdio.h:104:19: error: conflicting declaration 'typedef __ssize_t ssize_t'
 typedef __ssize_t ssize_t;
                   ^~~~~~~
In file included from /usr/share/mingw-w64/include/stddef.h:7:0,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/stddef.h:1,
                 from /usr/include/stdio.h:33,
                 from /usr/include/tesseract/baseapi.h:28,
                 from tessbridge.cpp:5:
/usr/share/mingw-w64/include/crtdefs.h:45:35: note: previous declaration as 'typedef long long int ssize_t'
 __MINGW_EXTENSION typedef __int64 ssize_t;
                                   ^~~~~~~
In file included from /usr/include/sys/types.h:132:0,
                 from /usr/include/stdlib.h:275,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/mm_malloc.h:27,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/xmmintrin.h:34,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/x86intrin.h:33,
                 from /usr/share/mingw-w64/include/winnt.h:1519,
                 from /usr/share/mingw-w64/include/minwindef.h:163,
                 from /usr/share/mingw-w64/include/windef.h:8,
                 from /usr/share/mingw-w64/include/windows.h:69,
                 from /usr/include/tesseract/host.h:65,
                 from /usr/include/tesseract/tesscallback.h:22,
                 from /usr/include/tesseract/baseapi.h:36,
                 from tessbridge.cpp:5:
/usr/include/time.h:75:18: error: conflicting declaration 'typedef __time_t time_t'
 typedef __time_t time_t;
                  ^~~~~~
In file included from /usr/share/mingw-w64/include/stddef.h:7:0,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/stddef.h:1,
                 from /usr/include/stdio.h:33,
                 from /usr/include/tesseract/baseapi.h:28,
                 from tessbridge.cpp:5:
/usr/share/mingw-w64/include/crtdefs.h:138:20: note: previous declaration as 'typedef __time64_t time_t'
 typedef __time64_t time_t;
                    ^~~~~~
In file included from /usr/share/mingw-w64/include/winsock.h:32:0,
                 from /usr/share/mingw-w64/include/windows.h:92,
                 from /usr/include/tesseract/host.h:65,
                 from /usr/include/tesseract/tesscallback.h:22,
                 from /usr/include/tesseract/baseapi.h:36,
                 from tessbridge.cpp:5:
/usr/share/mingw-w64/include/_timeval.h:10:8: error: redefinition of 'struct timeval'
 struct timeval
        ^~~~~~~
In file included from /usr/include/sys/select.h:47:0,
                 from /usr/include/sys/types.h:219,
                 from /usr/include/stdlib.h:275,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/mm_malloc.h:27,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/xmmintrin.h:34,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/x86intrin.h:33,
                 from /usr/share/mingw-w64/include/winnt.h:1519,
                 from /usr/share/mingw-w64/include/minwindef.h:163,
                 from /usr/share/mingw-w64/include/windef.h:8,
                 from /usr/share/mingw-w64/include/windows.h:69,
                 from /usr/include/tesseract/host.h:65,
                 from /usr/include/tesseract/tesscallback.h:22,
                 from /usr/include/tesseract/baseapi.h:36,
                 from tessbridge.cpp:5:
/usr/include/bits/time.h:30:8: error: previous definition of 'struct timeval'
 struct timeval
        ^~~~~~~
In file included from /usr/share/mingw-w64/include/winsock.h:36:0,
                 from /usr/share/mingw-w64/include/windows.h:92,
                 from /usr/include/tesseract/host.h:65,
                 from /usr/include/tesseract/tesscallback.h:22,
                 from /usr/include/tesseract/baseapi.h:36,
                 from tessbridge.cpp:5:
/usr/share/mingw-w64/include/psdk_inc/_fd_types.h:21:16: error: using typedef-name 'fd_set' after 'struct'
 typedef struct fd_set
                ^~~~~~
In file included from /usr/include/sys/types.h:219:0,
                 from /usr/include/stdlib.h:275,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/mm_malloc.h:27,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/xmmintrin.h:34,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/x86intrin.h:33,
                 from /usr/share/mingw-w64/include/winnt.h:1519,
                 from /usr/share/mingw-w64/include/minwindef.h:163,
                 from /usr/share/mingw-w64/include/windef.h:8,
                 from /usr/share/mingw-w64/include/windows.h:69,
                 from /usr/include/tesseract/host.h:65,
                 from /usr/include/tesseract/tesscallback.h:22,
                 from /usr/include/tesseract/baseapi.h:36,
                 from tessbridge.cpp:5:
/usr/include/sys/select.h:77:5: note: 'fd_set' has a previous declaration here
   } fd_set;
     ^~~~~~
In file included from /usr/share/mingw-w64/include/winsock.h:36:0,
                 from /usr/share/mingw-w64/include/windows.h:92,
                 from /usr/include/tesseract/host.h:65,
                 from /usr/include/tesseract/tesscallback.h:22,
                 from /usr/include/tesseract/baseapi.h:36,
                 from tessbridge.cpp:5:
/usr/share/mingw-w64/include/psdk_inc/_fd_types.h:25:3: error: conflicting declaration 'typedef int fd_set'
 } fd_set;
   ^~~~~~
In file included from /usr/include/sys/types.h:219:0,
                 from /usr/include/stdlib.h:275,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/mm_malloc.h:27,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/xmmintrin.h:34,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/x86intrin.h:33,
                 from /usr/share/mingw-w64/include/winnt.h:1519,
                 from /usr/share/mingw-w64/include/minwindef.h:163,
                 from /usr/share/mingw-w64/include/windef.h:8,
                 from /usr/share/mingw-w64/include/windows.h:69,
                 from /usr/include/tesseract/host.h:65,
                 from /usr/include/tesseract/tesscallback.h:22,
                 from /usr/include/tesseract/baseapi.h:36,
                 from tessbridge.cpp:5:
/usr/include/sys/select.h:77:5: note: previous declaration as 'typedef struct fd_set fd_set'
   } fd_set;
     ^~~~~~
In file included from /usr/share/mingw-w64/include/winsock.h:36:0,
                 from /usr/share/mingw-w64/include/windows.h:92,
                 from /usr/include/tesseract/host.h:65,
                 from /usr/include/tesseract/tesscallback.h:22,
                 from /usr/include/tesseract/baseapi.h:36,
                 from tessbridge.cpp:5:
/usr/share/mingw-w64/include/psdk_inc/_fd_types.h:104:16: error: using typedef-name 'fd_set' after 'struct'
 typedef struct fd_set FD_SET;
                ^~~~~~
In file included from /usr/include/sys/types.h:219:0,
                 from /usr/include/stdlib.h:275,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/mm_malloc.h:27,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/xmmintrin.h:34,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/x86intrin.h:33,
                 from /usr/share/mingw-w64/include/winnt.h:1519,
                 from /usr/share/mingw-w64/include/minwindef.h:163,
                 from /usr/share/mingw-w64/include/windef.h:8,
                 from /usr/share/mingw-w64/include/windows.h:69,
                 from /usr/include/tesseract/host.h:65,
                 from /usr/include/tesseract/tesscallback.h:22,
                 from /usr/include/tesseract/baseapi.h:36,
                 from tessbridge.cpp:5:
/usr/include/sys/select.h:77:5: note: 'fd_set' has a previous declaration here
   } fd_set;
     ^~~~~~
In file included from /usr/share/mingw-w64/include/winsock.h:36:0,
                 from /usr/share/mingw-w64/include/windows.h:92,
                 from /usr/include/tesseract/host.h:65,
                 from /usr/include/tesseract/tesscallback.h:22,
                 from /usr/include/tesseract/baseapi.h:36,
                 from tessbridge.cpp:5:
/usr/share/mingw-w64/include/psdk_inc/_fd_types.h:105:16: error: using typedef-name 'fd_set' after 'struct'
 typedef struct fd_set *PFD_SET;
                ^~~~~~
In file included from /usr/include/sys/types.h:219:0,
                 from /usr/include/stdlib.h:275,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/mm_malloc.h:27,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/xmmintrin.h:34,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/x86intrin.h:33,
                 from /usr/share/mingw-w64/include/winnt.h:1519,
                 from /usr/share/mingw-w64/include/minwindef.h:163,
                 from /usr/share/mingw-w64/include/windef.h:8,
                 from /usr/share/mingw-w64/include/windows.h:69,
                 from /usr/include/tesseract/host.h:65,
                 from /usr/include/tesseract/tesscallback.h:22,
                 from /usr/include/tesseract/baseapi.h:36,
                 from tessbridge.cpp:5:
/usr/include/sys/select.h:77:5: note: 'fd_set' has a previous declaration here
   } fd_set;
     ^~~~~~
In file included from /usr/share/mingw-w64/include/winsock.h:36:0,
                 from /usr/share/mingw-w64/include/windows.h:92,
                 from /usr/include/tesseract/host.h:65,
                 from /usr/include/tesseract/tesscallback.h:22,
                 from /usr/include/tesseract/baseapi.h:36,
                 from tessbridge.cpp:5:
/usr/share/mingw-w64/include/psdk_inc/_fd_types.h:106:16: error: using typedef-name 'fd_set' after 'struct'
 typedef struct fd_set *LPFD_SET;
                ^~~~~~
In file included from /usr/include/sys/types.h:219:0,
                 from /usr/include/stdlib.h:275,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/mm_malloc.h:27,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/xmmintrin.h:34,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/x86intrin.h:33,
                 from /usr/share/mingw-w64/include/winnt.h:1519,
                 from /usr/share/mingw-w64/include/minwindef.h:163,
                 from /usr/share/mingw-w64/include/windef.h:8,
                 from /usr/share/mingw-w64/include/windows.h:69,
                 from /usr/include/tesseract/host.h:65,
                 from /usr/include/tesseract/tesscallback.h:22,
                 from /usr/include/tesseract/baseapi.h:36,
                 from tessbridge.cpp:5:
/usr/include/sys/select.h:77:5: note: 'fd_set' has a previous declaration here
   } fd_set;
     ^~~~~~
In file included from /usr/share/mingw-w64/include/windows.h:114:0,
                 from /usr/include/tesseract/host.h:65,
                 from /usr/include/tesseract/tesscallback.h:22,
                 from /usr/include/tesseract/baseapi.h:36,
                 from tessbridge.cpp:5:
/usr/share/mingw-w64/include/stralign.h: In function 'int ua_wcsicmp(LPCUWSTR, LPCUWSTR)':
/usr/share/mingw-w64/include/stralign.h:155:56: error: '_wcsicmp' was not declared in this scope
       return _wcsicmp((LPCWSTR)String1,(LPCWSTR)String2);
                                                        ^
In file included from /usr/include/leptonica/environ.h:46:0,
                 from /usr/include/leptonica/alltypes.h:37,
                 from /usr/include/leptonica/allheaders.h:35,
                 from tessbridge.cpp:6:
/usr/include/stdint.h: At global scope:
/usr/include/stdint.h:122:27: error: conflicting declaration 'typedef long unsigned int uintptr_t'
 typedef unsigned long int uintptr_t;
                           ^~~~~~~~~
In file included from /usr/share/mingw-w64/include/stddef.h:7:0,
                 from /usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/include/stddef.h:1,
                 from /usr/include/stdio.h:33,
                 from /usr/include/tesseract/baseapi.h:28,
                 from tessbridge.cpp:5:
/usr/share/mingw-w64/include/crtdefs.h:75:44: note: previous declaration as 'typedef long long unsigned int uintptr_t'
 __MINGW_EXTENSION typedef unsigned __int64 uintptr_t;
                                            ^~~~~~~~~

@will7200
Copy link
Contributor

will7200 commented Jun 9, 2018

Leptonica and Tesseract have to be built by the cross-compiler to be able to build on windows, otherwise, those libraries will not be linked correctly and the package will fail to build properly.

@otiai10
Copy link
Owner

otiai10 commented Jun 9, 2018

ah...

@otiai10 otiai10 closed this as completed Jun 15, 2018
@czh0318
Copy link

czh0318 commented Nov 16, 2018

Leptonica and Tesseract have to be built by the cross-compiler to be able to build on windows, otherwise, those libraries will not be linked correctly and the package will fail to build properly.

How to do on macos,please?

@martinadderiy33
Copy link

he i got undefined: gosseract.NewClientcompilerUndeclaredImportedName
in line

client := gosseract.NewClient()

my device is windows 11

can help ?

@Ninferio
Copy link

Ninferio commented Aug 8, 2024

he i got undefined: gosseract.NewClientcompilerUndeclaredImportedName in line

client := gosseract.NewClient()

my device is windows 11

can help ?

have the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants