-
-
Notifications
You must be signed in to change notification settings - Fork 787
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
golang project: can't find import #275
Comments
Sorry, importing external libraries is not currently supported and we can only compile some codes that uses the built-in library. At present, the focus of xmake is to improve the compilation of c/c++. I will support it in the future, but currently I suggest you still use |
@waruqi Fair enough, thanks for the quick response! |
Is this still the case for external go dependencies? |
Yes |
I have initially supported the installation and integration of third-party go dependency packages, but it is not very perfect (the specified version is not currently supported and cascading dependencies require manual configuration) Because currently I use for example: https://github.com/xmake-io/xmake/blob/dev/tests/projects/go/console_with_pkgs/xmake.lua add_rules("mode.debug", "mode.release")
add_requires("go::github.com/sirupsen/logrus", {alias = "logrus"})
add_requires("go::golang.org/x/sys/internal/unsafeheader", {alias = "unsafeheader"})
if is_plat("windows") then
add_requires("go::golang.org/x/sys/windows", {alias = "syshost"})
else
add_requires("go::golang.org/x/sys/unix", {alias = "syshost"})
end
target("test")
set_kind("binary")
add_files("src/*.go")
add_packages("logrus", "syshost", "unsafeheader") |
I'm attempting to use
xmake v2.2.3.201811282159
withgo version go1.11.2 windows/amd64
. I created a project as such:xmake can now build the project. However, when I import a package in my
main.go
,xmake
fails:The
docopt-go
is in my $GOPATH. Fromgo env
:And
c:\Users\nusko\go\pkg\windows_amd64\github.com\docopt\docopt-go.a
(from using go get...)Now, if I cd to src and
go build
, it compiles just fine. It'sgo tool compile ...
that xmake runs that fails.Any ideas?
The text was updated successfully, but these errors were encountered: