This is an example of how to build shared libraries (.dll, .so) in Go and C using Linux.
You have to install x86_64-w64-mingw32-gcc
compiler to build a shared library for Windows (.dll).
Makefile has had targets for building libraries (Go, C) and a client app as an example. Here is how you can try it:
Target | Action |
---|---|
make (all) |
builds Go and C .so libraries, the client app, then runs the app |
make run |
runs the app |
make usego / make usec |
swaps the shared library for Go / C |
make win |
builds Go and C .dll libraries for Windows |
make clean |
deletes object files |
make fclean |
deletes object files, binaries and libraries |
make re |
make fclean + make (all) |