Yeah, that is doable, but I find it kind of messy, heh. I made a wrapper for
the proc that will accept my const directly instead. I was just sort of
surprised that it didn't work since it feels like the sort of thing that should
work in Nim, and thought I might be missing something.
Anyway,
It is a problem with the proc signature. If I define a const as follows:
BLUE_RGB = (0.uint8, 0.uint8, 255.uint8)
and call the proc as follows:
texture.texPtr.setTextureColorMod(BLUE_RGB)
the compiler gives the following error when I try to compile:
_Error: type
You will need to write
texture.texPtr.setTextureColorMod(BLUE_RGB[0], BLUE_RGB[1], BLUE_RGB[2])
As setTextureColorMod does not accept tuple as argument
> I consider it something that Nim should be concerned about.
I am concerned. Now what? How can we improve the situation?
It might be aadded to a FAQ but this is clearly a distribution issue.
Searching "ubuntu /usr/local/lib" yields 700k+ results according to Google. The
first page all have at least one correct answer (export ...).
Also no regular package installs in `/usr/local/lib`, only things that you
compile
I consider it something that Nim should be concerned about. It's already caused
me a fair bit of grief trying to get the bindings working on Linux and I'm sure
anyone else will run into the same issue down the road. Keep in mind it's not
my .so that it was failing to find, but an .so that mine
(My previous post was posted before mapi's post became visible due to new
account moderation.)
> Only I used `require` for its name.
The three related keywords (`import`, `include`, and this proposed new one)
should be easy to remember which is which.
* `include` reminds people of C
It is not Nim's problem.
>From the `dlopen` doco, you definitely need to either use `ldconfig` or set
>`LD_LIBRARY_PATH`, because `dlopen` does not check `/usr/local/lib` by default:
o (ELF only) If the executable file for the calling program
contains a
I think I figured out why setting export LD_LIBRARY_PATH=/usr/local/lib was
necessary to make it work. [The dlopen()
function](http://man7.org/linux/man-pages/man3/dlopen.3.html) is used under the
hood for the dynlib macro on Linux. dlopen() will not search /usr/local/lib by
default. It needs
What is the error messsage? I don't want to install sdl2 just to find out.
Likely, you need to add 'i8 suffix to the constant to clearly identify the type
Thanks guys
11 matches
Mail list logo