# learning-nim-c-bindings **Repository Path**: EEPPEE_admin/learning-nim-c-bindings ## Basic Information - **Project Name**: learning-nim-c-bindings - **Description**: I don't know anything about nim so far - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: Imlib2-nim - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-27 - **Last Updated**: 2026-01-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Imlib2 This is just a wrapper of the [Imlib2 library](https://docs.enlightenment.org/api/imlib2/html/). Thanks to Vindaar for his [initial gist](https://gist.github.com/Vindaar/e518e310eb3a0a95bdda7bbe8e4341f8) # current how to preview build or check usage - and I fix some warnings from nimble build. ```bash cd examples nimble build --verbose --verbosity:3 ``` # internal of nimble ```bash # step1 /home/etcix/Downloads/nim-2.2.6/bin/nim c --colors:on --noNimblePath --verbosity:3 -d:NimblePkgVersion=0.1.1 --path:/home/etcix/code/nimcode/Imlib2/examples --path:/home/etcix/.nimble/pkgs2/x11-1.2-6db9aa495a228e9e68faa80acf301f60accd8e5a -o:/home/etcix/code/nimcode/Imlib2/examples/example1 /home/etcix/code/nimcode/Imlib2/examples/example1.nim # step2 gcc -o /home/etcix/code/nimcode/Imlib2/examples/example1 /home/etcix/.cache/nim/example1_d/@psystem@sexceptions.nim.c.o /home/etcix/.cache/nim/example1_d/@pstd@sprivate@sdigitsutils.nim.c.o /home/etcix/.cache/nim/example1_d/@psystem@sdollars.nim.c.o /home/etcix/.cache/nim/example1_d/@pstd@ssyncio.nim.c.o /home/etcix/.cache/nim/example1_d/@psystem.nim.c.o /home/etcix/.cache/nim/example1_d/@px11@sxlib.nim.c.o /home/etcix/.cache/nim/example1_d/@px11@sxutil.nim.c.o /home/etcix/.cache/nim/example1_d/@mexample1.nim.c.o -pthread -pthread -L/usr/lib/x86_64-linux-gnu/ -l:libImlib2.a -l:libXext.a -l:libX11.a -l:libX11-xcb.a -l:libxcb-shm.a -l:libxcb.a -l:libXau.a -l:libXdmcp.a -l:libfreetype.a -l:libpng.a -l:libz.a -l:libbz2.a -l:libbrotlidec.a -l:libbrotlicommon.a -Wl,-Bdynamic -lm -ldl -lpthread -Wl,--as-needed -Wl,--no-whole-archive -Wl,-z,relro,-z,now -ldl ``` # todo 1. I don't know how to directly use of git repo as a nimble dependency. so I just copy the files to the examples folder. 2. the core thing I want to learn from nim is his static link feature that I met in boomer application. it is so freaking weird that I can't link the imlib2 library statically.As compare below ```bash # boomer application $ ldd /usr/local/bin/boomer linux-vdso.so.1 (0x00007f86c4eef000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f86c4ca1000) /lib64/ld-linux-x86-64.so.2 (0x00007f86c4ef1000) # this exampel1 $ ldd examples/example1 linux-vdso.so.1 (0x00007f83abe6a000) libImlib2.so.1 => /lib/x86_64-linux-gnu/libImlib2.so.1 (0x00007f83abdb4000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f83abbbf000) libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f83abaef000) libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007f83abada000) libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f83abad5000) libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f83ab98b000) libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f83ab960000) libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f83ab95b000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f83ab86b000) /lib64/ld-linux-x86-64.so.2 (0x00007f83abe6c000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f83ab84b000) libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f83ab836000) libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f83ab7fe000) libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007f83ab7f0000) libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f83ab7eb000) libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f83ab7e3000) libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007f83ab7be000) ```