# dll化するコードをコンパイル
$ gcc -c dylibexample.c
>> dylibexample.c dylibexample.o
# -sharedオプションをつけてdllに変換
$ gcc -shared -o dylibexample.dll dylibexample.c
>> dylibexample.dll
# コンパイル時にダイナミックリンクライブラリ(dylibexample.dll)をリンク
$ gcc -I./ -L./ -o main.exe main.c -ldylibexample
$ ./main.exe
>> Hello!
userdll = windll.LoadLibrary('dylibexample.dll')
userdll.hello()