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 when make build #15

Open
Nafidinara opened this issue May 13, 2022 · 8 comments
Open

Error when make build #15

Nafidinara opened this issue May 13, 2022 · 8 comments
Labels
question Further information is requested

Comments

@Nafidinara
Copy link

Nafidinara commented May 13, 2022

Hello, I'm always getting error when try to run make build. this is the detail :
go build -ldflags="-s -w" -buildmode c-shared -o .build/uplink.so. runtime/cgo cgo-builtin-prolog:1: stddef.h: No such file or directory make: *** [build] Error 2
Can you help me how to solve this?

@Nafidinara
Copy link
Author

image

@ifraixedes
Copy link
Member

Hello @Nafidinara,

Can you provide details of your environment (OS version, etc.), please?

@mniewrzal
Copy link
Contributor

Also, could you give us an output of make -v command?

@ifraixedes ifraixedes added the question Further information is requested label May 13, 2022
@Nafidinara
Copy link
Author

OS : Windows 10
Go version : go1.18.2 windows/amd64

and this when I run make -v
GNU Make 3.82 Built for i686-pc-mingw32 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

@Erikvv
Copy link
Contributor

Erikvv commented May 13, 2022

I wonder if you may need to install the Windows SDK (https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/)

@Erikvv
Copy link
Contributor

Erikvv commented May 13, 2022

For github.com/TopperDEL/uplink.net our friend installs MSYS2 and within that installs the package group mingw-w64-x86_64-toolchain. This also supplies stddef.h.

@egonelbre
Copy link
Member

egonelbre commented May 14, 2022

I've found that https://jmeubank.github.io/tdm-gcc/ is usually the easiest way to get C compiling to work with Go + Windows. This assumes it doesn't need to link to external libs (e.g. portaudio) -- in other words, it should work fine with uplink-c.

@ifraixedes
Copy link
Member

ifraixedes commented May 10, 2023

I'm wondering what we have to do to close this issue.
Should we document something in the README about compiling it in Windows?

I'm also wondering how the current build target can generate a DLL for windows.

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

No branches or pull requests

5 participants