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

Windows/cgo: cannot find -lmingwex & cannot find -lmingw32 #7265

Closed
gopherbot opened this issue Feb 5, 2014 · 5 comments
Closed

Windows/cgo: cannot find -lmingwex & cannot find -lmingw32 #7265

gopherbot opened this issue Feb 5, 2014 · 5 comments

Comments

@gopherbot
Copy link
Contributor

by czarek.tomczak:

Hi,

I'm trying to include some external C library using this code:

  /*
  #define _WIN32
  #cgo windows CFLAGS: -I.
  #cgo windows LDFLAGS: -L./lib -llibcef
  #include "include/capi/cef_app_capi.h"
  */
  import "C"


And I get these errors:

  # _/C_/cef2go/cef2go/src/cef
  /usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lmingwex
  /usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lmingw32
  collect2: error: ld returned 1 exit status


Go version:

  go1.2 windows/386 on Win7 64-bit.

Thanks for help in this matter.

Best regards,
Czarek
@gopherbot
Copy link
Contributor Author

Comment 1 by czarek.tomczak:

The build command is:
  go build -o bin/cef2go.exe src/main_win.go

@gopherbot
Copy link
Contributor Author

Comment 2 by czarek.tomczak:

Turns out I had cygwin/bin/ in my PATH. Sorry. You can close this issue.

@ianlancetaylor
Copy link
Contributor

Comment 3:

Status changed to Retracted.

@gopherbot
Copy link
Contributor Author

Comment 4 by valevkiril:

What was the solution to your problem? I am getting the same error while trying to "go
get github.com/mattn/go-sqlite3":
  $ go get github.com/mattn/go-sqlite3
  # github.com/mattn/go-sqlite3
  /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lmingwex
  /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lmingw32
  collect2: error: ld returned 1 exit status
Go version:
  go version go1.3.3 windows/amd64
Cygwin on Windows 7 64-bit.

@davecheney
Copy link
Contributor

Comment 5:

valevkiril, go is not compatible with cygwin (either 32bit or 64bit), please use mingw.
Please do not comment on this issue again, it is closed. I suggest asking for assistance
on the go-nuts mailing list, or raising an issue on the go-sqlite3 project on github.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants