I'm trying to write some stuff in Elixir that uses the wx, gl, and glu modules from Erlang. These have a lot of macro defines that, as far as I know, I need to wrap to access in Elixir. I've found a few ways that this is done, but none of them seem to work. This example: https://gist.github.com/simonmcconnell/a20c245bb441986c8f6da65fa6489a9d is ideal for me, because I'd like it to update with changes to the underling wxErlang modules. But even a "simpler" example such as https://wtfleming.github.io/blog/getting-started-opengl-elixir/ doesn't seem to work.
In both cases, there seems to be an issue with the -include_lib calls. As an example from the gist which generates calls for all of the macros, I'm getting this error:
❯ iex -S mix
Compiling 2 files (.erl)
src/wx_include.erl:2:14: can't find include lib "wx/include/wx.hrl"
% 2| -include_lib("wx/include/wx.hrl").
% | ^
src/wx_include.erl:4:25: undefined macro 'wxDefaultCoord'
% 4| get(wxDefaultCoord) -> ?wxDefaultCoord;
% | ^
src/wx_include.erl:3:2: function get/1 undefined
% 3| -export([get/1]).
% | ^
src/gl_include.erl:2:14: can't find include lib "wx/include/gl.hrl"
% 2| -include_lib("wx/include/gl.hrl").
% | ^
src/gl_include.erl:4:27: undefined macro 'GL_VERSION_1_1'
% 4| get(glGL_VERSION_1_1) -> ?GL_VERSION_1_1;
% | ^
src/gl_include.erl:3:2: function get/1 undefined
% 3| -export([get/1]).
% | ^
From the simpler example where only the used macros are exported, it's similar:
❯ iex -S mix
Compiling 2 files (.erl)
src/gl_const.erl:4:14: can't find include lib "wx/include/gl.hrl"
% 4| -include_lib("wx/include/gl.hrl").
% | ^
src/wx_const.erl:4:14: can't find include lib "wx/include/wx.hrl"
% 4| -include_lib("wx/include/wx.hrl").
% | ^
src/gl_const.erl:7:4: undefined macro 'GL_SMOOTH'
% 7| ?GL_SMOOTH.
% | ^