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

Does this package support -buildmode=c-shared #191

Open
MicahKimel opened this issue Oct 17, 2023 · 1 comment
Open

Does this package support -buildmode=c-shared #191

MicahKimel opened this issue Oct 17, 2023 · 1 comment

Comments

@MicahKimel
Copy link

I am attempting to build a dll that uses this package. On opening the odbc connection with the sql.Open("odbc", "mydns") I always receive an unable to marshal error (very generic and disappointing). My golang executable works fine outside of -buildmode=c-shared. I'm wondering if anyone has had success building a golang dll using this package. Here is a tutorial I followed for creating my dll and using it in C# https://medium.com/@shantanukhande/red-team-how-to-embed-golang-tools-in-c-e269bf33876a

Here is an example build command
go build -buildmode=c-shared -o my_go.dll main.go

If anyone knows of anything I can do to debug this further please let me know.

@alexbrainman
Copy link
Owner

Hello @MicahKimel

If anyone knows of anything I can do to debug this further please let me know.

Not many developers see your question here. I suspect I am the only person who saw your message. I suggest you try some of those

https://github.com/golang/go/wiki/Questions

I would also ask the dude who wrote the article you are referring to

https://medium.com/@shantanukhande/red-team-how-to-embed-golang-tools-in-c-e269bf33876a

he seems to be the expert in this area.

I am also happy to try and reproduce your problem, when I have time. But you need to provide exact steps of what I need to do - including all software I need to install. Also note that I only have Linux computer.

Alex

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

No branches or pull requests

2 participants