All Projects → shadowmint → Go Static Linking

shadowmint / Go Static Linking

Demo of how to static link a c library to some go code.

Labels

Projects that are alternatives of or similar to Go Static Linking

Hlslib
A collection of extensions for Vivado HLS and Intel FPGA OpenCL to improve developer quality of life.
Stars: ✭ 131 (-9.66%)
Mutual labels:  cmake
Rttr
C++ Reflection Library
Stars: ✭ 2,031 (+1300.69%)
Mutual labels:  cmake
Modern Wasm Starter
🛸 Run C++ code on web and create blazingly fast websites! A starter template to easily create WebAssembly packages using type-safe C++ bindings with automatic TypeScript declarations.
Stars: ✭ 140 (-3.45%)
Mutual labels:  cmake
Notepanda
📃 A simple cross-platform notepad. Based on Qt and C++.
Stars: ✭ 134 (-7.59%)
Mutual labels:  cmake
Cmake
Common CMake modules
Stars: ✭ 137 (-5.52%)
Mutual labels:  cmake
Multi Rtl
Multi-channel receiver with use of RTL-SDR dongles
Stars: ✭ 142 (-2.07%)
Mutual labels:  cmake
Racecar gazebo
A gazebo-based simulator of the MIT Racecar.
Stars: ✭ 130 (-10.34%)
Mutual labels:  cmake
Grpc Cmake Example
gRPC C++ example with CMake
Stars: ✭ 142 (-2.07%)
Mutual labels:  cmake
Cmake Avr
cmake toolchain for AVR
Stars: ✭ 137 (-5.52%)
Mutual labels:  cmake
Ocean
A C/C++ build system/project manager written in Rust
Stars: ✭ 144 (-0.69%)
Mutual labels:  cmake
Blt
A streamlined CMake build system foundation for developing HPC software
Stars: ✭ 135 (-6.9%)
Mutual labels:  cmake
Cmakeprotosgrpc
gRPC + protobuf using CMake example
Stars: ✭ 137 (-5.52%)
Mutual labels:  cmake
Minimal cmake example
this tries to be a minimal cmake example, that covers sources resources dependencies and packaging.
Stars: ✭ 142 (-2.07%)
Mutual labels:  cmake
Gemm hls
Scalable systolic array-based matrix-matrix multiplication implemented in Vivado HLS for Xilinx FPGAs.
Stars: ✭ 134 (-7.59%)
Mutual labels:  cmake
Chronoshift
An open source re-implementation of Red Alert written in C++.
Stars: ✭ 144 (-0.69%)
Mutual labels:  cmake
Cmake Example
Example project which demonstrates various CMake features.
Stars: ✭ 131 (-9.66%)
Mutual labels:  cmake
Reggae
Build system in D, Python, Ruby, Javascript or Lua
Stars: ✭ 141 (-2.76%)
Mutual labels:  cmake
Moderncppstarter
🚀 Kick-start your C++! A template for modern C++ projects using CMake, CI, code coverage, clang-format, reproducible dependency management and much more.
Stars: ✭ 2,381 (+1542.07%)
Mutual labels:  cmake
Fibos
[WIP] JavaScript Toolchain on EOS
Stars: ✭ 144 (-0.69%)
Mutual labels:  cmake
Huggle3 Qt Lx
Huggle is an anti-vandalism tool for use on MediaWiki based projects
Stars: ✭ 143 (-1.38%)
Mutual labels:  cmake

Go-C static linked demo

Quick demo to show how to statically link a c library to a go application.

Quick start

mkdir build
cd build
cmake ..
make

cd ..
cd demo
export GOPATH=`pwd`
go build
./demo

Windows

Building and running on windows is complicated. Long story short, do this:

mkdir build
cd build
cmake .. -G "MSYS Makefiles"
make

cd ..
cd demo
export GOPATH=`pwd`
go build
./demo

Windows notes

You must use MSYS for cgo. Visual studio is not supported. Install MSYS and run the MSYS shell for the commands.

You must also use the right MSYS. The default MSYS is usually 32-bit; the default windows install of go is 64-bit. That won't work. Either install the 64-bit version of MSYS, or the 32-bit version of go.

You have to use the MSYS shell. Using the standard shell, or powershell won't work; the right commands are not the PATH and go build won't work.

Once again, no, visual studio is not supported. If you run:

cmake ..

The default is to generate a visual studio projet. Don't use this, the static .lib file generated is not compatible.

Finally, yes, it does actually work. :)

yay

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].