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

Error mingw ld - cannot find -lflutter_engine #34

Closed
Fireprufe15 opened this issue Nov 28, 2018 · 6 comments
Closed

Error mingw ld - cannot find -lflutter_engine #34

Fireprufe15 opened this issue Nov 28, 2018 · 6 comments
Labels
Windows Specifically concerns Windows

Comments

@Fireprufe15
Copy link

When I attempt to run go get -u -v github.com/Drakirus/go-flutter-desktop-embedder on Windows, following your instructions, I get the following error:

c:/winbuilds/bin/../lib64/gcc/x86_64-w64-mingw32/4.8.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lflutter_engine
collect2.exe: error: ld returned 1 exit status

I did run the flag command from your instructions first.
Am I doing something wrong?

@pchampio
Copy link
Member

pchampio commented Nov 28, 2018

When you run go get -u -v github.com/Drakirus/go-flutter-desktop-embedder golang will try to compile the project. (certainly for caching purposes)

So it's doesn't mater if it fail during go get.

Does the error occurs when building the simpleDemo ?

@pchampio pchampio added the Windows Specifically concerns Windows label Nov 28, 2018
@Fireprufe15
Copy link
Author

Yeah the same problem happens when I run go build.

I did set the path in the main.go file, maybe I did it wrong though?
Is it supposed to be
gutter.OptionICUDataPath("/opt/flutter/bin/cache/artifacts/engine/windows-x64/icudtl.dat"),
or
gutter.OptionICUDataPath("/flutter/bin/cache/artifacts/engine/windows-x64/icudtl.dat"),

Neither of those work for me. Do I need to set it to some specific path on my PC?

@pchampio
Copy link
Member

pchampio commented Nov 28, 2018

The linker dosn't seems to find the flutter_engine.dll , can you put the dll into the mingw64's lib folder ?


I did set the path in the main.go file, maybe I did it wrong though?
Is it supposed to be
gutter.OptionICUDataPath("/opt/flutter/bin/cache/artifacts/engine/windows-x64/icudtl.dat"),
or
gutter.OptionICUDataPath("/flutter/bin/cache/artifacts/engine/windows-x64/icudtl.dat"),

gutter.OptionICUDataPath is used at run time, so the error doesn't come from here.
Yes make sure the path to the windows-x64/icudtl.dat is valid, (Checkout your flutter's directory)

@Fireprufe15
Copy link
Author

Yeah throwing it in with the mingw64 libs seems to work. Thanks.

@pchampio pchampio changed the title Error running go get -u -v github.com/Drakirus/go-flutter-desktop-embedder Error mingw ld - cannot find -lflutter_engine Nov 28, 2018
@pchampio
Copy link
Member

pchampio commented Nov 28, 2018

The generated binary, uses the flutter_engine.dll located right next to it.
The project should stay portable. The flutter_engine.dll in the mingw64 libs is only used for compiling.

Thank for the feedback! 👍

@pchampio pchampio pinned this issue Dec 17, 2018
@mdcfrancis
Copy link

If you are using powershell you have to use a different syntax $env:CGO_LDFLAGS = "-LC:\......\simpleDemo" allows me to compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Windows Specifically concerns Windows
Development

No branches or pull requests

3 participants