Skip to content

A working example for one of my Medium articles, illustrating hot to call C function pointers from Go

Notifications You must be signed in to change notification settings

lruggieri/cgo-function-pointers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Medium article

This repo is a working example of this Medium article.

How to compile

cd go
go build — buildmode=c-shared ./

cd ..
gcc -Wall -g main.c -o main go/function_pointers

and then run

DYLD_LIBRARY_PATH="$(pwd)/go" ./main on Mac

LD_LIBRARY_PATH="$(pwd)/go" ./main on Linux

Or, build a proper CMake file :)

About

A working example for one of my Medium articles, illustrating hot to call C function pointers from Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published