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

./bitmap/../base/zlib_util_c.h:2:18: fatal error: zlib.h: No such file or directory #100

Closed
tr0mb1r opened this issue Jan 11, 2018 · 14 comments
Labels
Milestone

Comments

@tr0mb1r
Copy link

tr0mb1r commented Jan 11, 2018

  • Robotgo version (or commit ref): latest
  • Go version: go version go1.9.2 windows/amd64
  • Gcc version: gcc (tdm64-1) 5.1.0
  • Operating system and bit: Win10_x64

go get github.com/go-vgo/robotgo
github.com/go-vgo/robotgo
In file included from ./bitmap/../base/str_io_c.h:2:0,
from ./bitmap/goBitmap.h:27,
from ......\go\src\github.com\go-vgo\robotgo\robotgo.go:45:
./bitmap/../base/zlib_util_c.h:2:18: fatal error: zlib.h: No such file or directory
compilation terminated.

@vcaesar
Copy link
Member

vcaesar commented Jan 11, 2018

The GCC compiler's file may be the problem, please use MinGW-w64. Please check your GCC configuration.

@tr0mb1r
Copy link
Author

tr0mb1r commented Jan 11, 2018

doesn't help, same error(

@tr0mb1r
Copy link
Author

tr0mb1r commented Jan 11, 2018

Solved, should change gcc compiler in the %PATH%

@henson
Copy link

henson commented Aug 9, 2018

@tr0mb1r 我遇到跟你一样的问题,怎么修改环境变量?没看明白,盼详解,谢谢

@tr0mb1r
Copy link
Author

tr0mb1r commented Aug 9, 2018

@henson just add your GCC compiler to the %PATH%
My problem was solved with next trick:
set PATH=C:\TDM-GCC-64\bin;%PATH%

@henson
Copy link

henson commented Aug 9, 2018

@tr0mb1r 我已经设置了 TDM-GCC-64\bin 在环境变量里,还是报错

@tr0mb1r
Copy link
Author

tr0mb1r commented Aug 9, 2018

@henson try to install MinGW-w64 and add it to %PATH%

@lichaoi
Copy link

lichaoi commented Nov 22, 2018

mingw 32, dowload zlib will be solved:
https://osdn.net/projects/mingw/releases/69331

@StarNek0
Copy link

StarNek0 commented Sep 16, 2019

feel despair.

I tried to do:

brew install gcc
brew install mingw-w64
brew install zlib

// Even I add zlib.h to robotgo/base
// Or install and make zlib

// build to windows amd64, again and again

GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -x ./

// Any way, it told me when build to win amd64:

base/zlib_util_c.h:2:10: fatal error: zlib.h: No such file or directory
#include <zlib.h>
^~~~~~~~
compilation terminated.

// but build to darwin success

  • Robotgo version (or commit ref): latest
  • Go version: go version go1.12.7
  • Gcc version: gcc9.1.0 (mingw-w64 6.0.0_1)
  • Operating system and bit: macOs10.14.6/amd64
  • Target system and bit: Win10_x64

@TenZeroTwo
Copy link

I solved the issue by google.
Unzip the package of zlib-x64 to the TDM-GCC dir.
https://github.com/lowkey42/MagnumOpus/wiki/TDM-GCC-Mingw64-Installation#zlib-x64

对方啥阵型啊?

@vcaesar
Copy link
Member

vcaesar commented Dec 11, 2019

All code tests and C dependencies use MinGw-w64, TDM-GCC has not been tested. Cross platform compilation reference #228, #143, #240.

@vcaesar
Copy link
Member

vcaesar commented Aug 23, 2021

All code tests and C dependencies use MinGw-64, TDM-GCC has not been tested.
But you can compile lpng and lzib yourself, and you can download https://sourceforge.net/projects/mingw-w64/files/ x86_64-posix.

@CarsonSlovoka
Copy link

For OS: windows

this answer may help to you

@Enginebeck
Copy link

I solved the issue by google. Unzip the package of zlib-x64 to the TDM-GCC dir. https://github.com/lowkey42/MagnumOpus/wiki/TDM-GCC-Mingw64-Installation#zlib-x64

对方啥阵型啊?

This solution works for me, I record what I've done in this article.

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

No branches or pull requests

8 participants