GithubHelp home page GithubHelp logo

Cross-compile error for Windows about go-ykpiv HOT 6 CLOSED

go-piv avatar go-piv commented on May 30, 2024 1
Cross-compile error for Windows

from go-ykpiv.

Comments (6)

luc-lynx avatar luc-lynx commented on May 30, 2024 2

So managed to make it work on Windows, here is a short instruction
https://github.com/luc-lynx/go-ykpiv#running-on-windows

and you must also add the following lines to the ykpiv.go:

#cgo windows CFLAGS: -I./win/include/ykpiv/
#cgo windows LDFLAGS: ./win/lib/libykpiv.dll.a

from go-ykpiv.

paultag avatar paultag commented on May 30, 2024 1

Hey, I've not. I don't have any Windows machines handy, and I don't have a ton of time. If someone can track down why this is happening, I'd take patches, but I've never spent time getting this working on Windows.

FWIW, the #cgo directives in slot.go like the #cgo linux or osx may need to be set for Windows, or maybe it's something with regards to not having the Windows .dll files. Not sure.

I don't know much about the Windows build toolchains, nor how well cgo cross-compiles work when you're targeting Windows :)

from go-ykpiv.

paultag avatar paultag commented on May 30, 2024 1

Scratch that I see your Windows commit. I pushed that as 3d7808f

from go-ykpiv.

ryandeivert avatar ryandeivert commented on May 30, 2024

hey @paultag are you able follow up on this at all? I'm also trying to compile for windows and get the same error. it looks like the cgo don't include anything for windows. I could maybe help address that

from go-ykpiv.

netmiller avatar netmiller commented on May 30, 2024

I'm still interested solving this. Now I use Node+Graphene(Electron) for my solution, but it had also some problems with Windows. Better solution for my project would be Golang. Haven't had time to play with this, so @ryandeivert if you have some ideas ...

from go-ykpiv.

paultag avatar paultag commented on May 30, 2024

@luc-lynx awsome! I have the change locally; do you want to send a PR I can merge for this or should I just push the lines as is? Thank you for your help!

from go-ykpiv.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.